From eed0090e32bae484c66d4b0892c78abe4858e54f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 15 Aug 2017 12:24:18 +0200 Subject: [PATCH] tweaks: close a file also in the error path [coverity scan] --- src/files.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/files.c b/src/files.c index 9ddff172..70c17b00 100644 --- a/src/files.c +++ b/src/files.c @@ -258,6 +258,7 @@ int write_lockfile(const char *lockfilename, const char *origfilename, bool modi if (wroteamt < lockdatalen) { statusline(MILD, _("Error writing lock file %s: %s"), lockfilename, ferror(filestream)); + fclose(filestream); goto free_the_data; }