Skip to content
Snippets Groups Projects
Commit 3f3353f2 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

mixer: fixed stream handle leakage

parent 25df8411
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment