diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-12-08 20:46:54 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-10 12:06:34 +0100 |
commit | f0d84d4826a6563693ae0abd6ac1f72a3eafdc68 (patch) | |
tree | 900307132fcbaf4c2993c817f555ea9fb3b10549 | |
parent | acd0a70dca1066e09fc98ed6576682b6de330e7c (diff) | |
download | px4-firmware-f0d84d4826a6563693ae0abd6ac1f72a3eafdc68.tar.gz px4-firmware-f0d84d4826a6563693ae0abd6ac1f72a3eafdc68.tar.bz2 px4-firmware-f0d84d4826a6563693ae0abd6ac1f72a3eafdc68.zip |
mpu6000: close fds before exit
-rw-r--r-- | src/drivers/mpu6000/mpu6000.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp index 6145a5117..ff921274b 100644 --- a/src/drivers/mpu6000/mpu6000.cpp +++ b/src/drivers/mpu6000/mpu6000.cpp @@ -1405,6 +1405,8 @@ start() if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) goto fail; + close(fd); + exit(0); fail: @@ -1508,6 +1510,8 @@ reset() if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) err(1, "driver poll restart failed"); + close(fd); + exit(0); } |