aboutsummaryrefslogtreecommitdiff
path: root/src/modules/systemlib/mixer/mixer_load.c
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-11-24 07:41:26 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-11-24 07:41:26 +0100
commitc37ff71e625310cdc777719a04c3702d9afa1f7f (patch)
tree714ecb7b510e7ff53080ce3f0caebe8b128a26f5 /src/modules/systemlib/mixer/mixer_load.c
parentf36f54c621cb5b36d345c5a26f72e89fc948fa65 (diff)
parent512779907e06f059a15d54c88d71b73aad9aced0 (diff)
downloadpx4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.tar.gz
px4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.tar.bz2
px4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.zip
Merge remote-tracking branch 'upstream/master' into ros
Conflicts: makefiles/config_px4fmu-v2_test.mk
Diffstat (limited to 'src/modules/systemlib/mixer/mixer_load.c')
-rw-r--r--src/modules/systemlib/mixer/mixer_load.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/systemlib/mixer/mixer_load.c b/src/modules/systemlib/mixer/mixer_load.c
index bf3428a50..0d629d610 100644
--- a/src/modules/systemlib/mixer/mixer_load.c
+++ b/src/modules/systemlib/mixer/mixer_load.c
@@ -91,6 +91,7 @@ int load_mixer_file(const char *fname, char *buf, unsigned maxlen)
/* if the line is too long to fit in the buffer, bail */
if ((strlen(line) + strlen(buf) + 1) >= maxlen) {
warnx("line too long");
+ fclose(fp);
return -1;
}
@@ -98,6 +99,7 @@ int load_mixer_file(const char *fname, char *buf, unsigned maxlen)
strcat(buf, line);
}
+ fclose(fp);
return 0;
}