Fix a potential file descriptor leak.
Found by cppcheck.
This commit is contained in:
parent
5aed916ef4
commit
31361075d3
1 changed files with 1 additions and 0 deletions
|
@ -613,6 +613,7 @@ make_names:
|
|||
FILE *fh = fopen(filename, "w");
|
||||
if(!fh) {
|
||||
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue