test_mixer: fix resource leak (unclosed dp)

This commit is contained in:
Beat Küng
2018-06-13 16:19:34 +02:00
committed by Lorenz Meier
parent 76c94b08f1
commit 20f2303e8a
+2
View File
@@ -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;
}
}