mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 03:53:33 +08:00
IO driver: Fix resource corner case (not a real leak)
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user