mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 08:38:53 +08:00
test_mixer: fix resource leak (unclosed dp)
This commit is contained in:
@@ -199,6 +199,7 @@ bool MixerTest::loadAllTest()
|
||||
|
||||
if (snprintf(buf, PATH_MAX, "%s/%s", MIXER_ONBOARD_PATH, result->d_name) >= PATH_MAX) {
|
||||
PX4_ERR("mixer path too long %s", result->d_name);
|
||||
closedir(dp);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -206,6 +207,7 @@ bool MixerTest::loadAllTest()
|
||||
|
||||
if (!ret) {
|
||||
PX4_ERR("Error testing mixer %s", buf);
|
||||
closedir(dp);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user