From 08b770d4251da3b506aabc6bb7f488ea1e2a5340 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 30 Aug 2016 11:45:33 +0200 Subject: [PATCH] files: close a lockfile after reading it --- src/files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/files.c b/src/files.c index 11f8eda2..37533e79 100644 --- a/src/files.c +++ b/src/files.c @@ -337,6 +337,8 @@ int do_lockfile(const char *filename) readtot += readamt; } while (readamt > 0 && readtot < LOCKBUFSIZE); + close(lockfd); + if (readtot < 48) { statusline(MILD, _("Error reading lock file %s: " "Not enough data read"), lockfilename);