files: close a lockfile after reading it

master
Benno Schulenberg 2016-08-30 11:45:33 +02:00
parent 2dffcf101f
commit 08b770d425
1 changed files with 2 additions and 0 deletions

View File

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