tweaks: do not leak a file descriptor when fdopen() fails

master
Benno Schulenberg 2020-02-02 11:08:59 +01:00
parent 74f4c37d5f
commit ee05daab92
1 changed files with 1 additions and 0 deletions

View File

@ -211,6 +211,7 @@ int write_lockfile(const char *lockfilename, const char *origfilename, bool modi
if (filestream == NULL) {
statusline(MILD, _("Error writing lock file %s: %s"),
lockfilename, strerror(errno));
close(fd);
goto free_the_data;
}