Commit 08b770d4 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

files: close a lockfile after reading it

No related merge requests found
Showing with 2 additions and 0 deletions
+2 -0
...@@ -337,6 +337,8 @@ int do_lockfile(const char *filename) ...@@ -337,6 +337,8 @@ int do_lockfile(const char *filename)
readtot += readamt; readtot += readamt;
} while (readamt > 0 && readtot < LOCKBUFSIZE); } while (readamt > 0 && readtot < LOCKBUFSIZE);
close(lockfd);
if (readtot < 48) { if (readtot < 48) {
statusline(MILD, _("Error reading lock file %s: " statusline(MILD, _("Error reading lock file %s: "
"Not enough data read"), lockfilename); "Not enough data read"), lockfilename);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment