mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-08 07:40:36 +08:00
Fix resource leaks identified by cppcheck
* Where possible rearrange error checks to avoid branching * Otherwise add missing `fclose`, `close`, `px4_close` calls before return
This commit is contained in:
committed by
Lorenz Meier
parent
0a61e9b279
commit
5be23060e7
@@ -79,6 +79,8 @@ int test_ppm_loopback(int argc, char *argv[])
|
||||
|
||||
if (result != OK) {
|
||||
warnx("PWM_SERVO_GET_COUNT");
|
||||
|
||||
(void)close(servo_fd);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user