Hotfix: Close fd before reusing it again

This commit is contained in:
Lorenz Meier
2014-07-11 14:02:22 +02:00
parent 5bb8c50112
commit 4c13c67504
@@ -666,6 +666,8 @@ int prearm_check(const struct vehicle_status_s *status, const int mavlink_fd)
}
if (!status->is_rotary_wing) {
/* accel done, close it */
close(fd);
fd = open(AIRSPEED_DEVICE_PATH, O_RDONLY);
if (fd < 0) {