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);