diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-19 14:06:21 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-21 08:58:47 +0100 |
commit | 12ce2de7ae0aa62f9501f7f53837772a6c662724 (patch) | |
tree | 0268909c9b69c7e43f11c443a7e31d774e58fff2 /src/drivers/px4io/px4io.cpp | |
parent | 6300338d2a3ebd110c738305a7ea21c1d318dfba (diff) | |
download | px4-firmware-12ce2de7ae0aa62f9501f7f53837772a6c662724.tar.gz px4-firmware-12ce2de7ae0aa62f9501f7f53837772a6c662724.tar.bz2 px4-firmware-12ce2de7ae0aa62f9501f7f53837772a6c662724.zip |
IO driver: Fix resource corner case (not a real leak)
Diffstat (limited to 'src/drivers/px4io/px4io.cpp')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 5698dbc57..3b64809e3 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012-2014 PX4 Development Team. All rights reserved. + * Copyright (c) 2012-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -3006,7 +3006,9 @@ monitor(void) fds[0].fd = 0; fds[0].events = POLLIN; - poll(fds, 1, 2000); + if (poll(fds, 1, 2000) < 0) { + errx(1, "poll fail"); + } if (fds[0].revents == POLLIN) { /* control logic is to cancel with any key */ |