tweaks: close a file also in the error path [coverity scan]

This commit is contained in:
Benno Schulenberg 2017-08-15 12:24:18 +02:00
parent 52e2e52db3
commit eed0090e32

View File

@ -258,6 +258,7 @@ int write_lockfile(const char *lockfilename, const char *origfilename, bool modi
if (wroteamt < lockdatalen) { if (wroteamt < lockdatalen) {
statusline(MILD, _("Error writing lock file %s: %s"), statusline(MILD, _("Error writing lock file %s: %s"),
lockfilename, ferror(filestream)); lockfilename, ferror(filestream));
fclose(filestream);
goto free_the_data; goto free_the_data;
} }