X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/93a18dd7a6b92922361383a4e6152380da5f3583..8699f1cc0c8db8d3b0d6e7d607f3e92b214ec80f:/sbr/lock_file.c?ds=inline diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 19cad331..2c8b1c75 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -522,6 +522,7 @@ lkopen_dot (const char *file, int access, mode_t mode, int *failed_to_lock) lockname (file, &lkinfo, 1); } + close(fd); *failed_to_lock = 1; return -1; } @@ -575,7 +576,7 @@ lockit (struct lockinfo *li) fd = link(tmpfile, curlock); (void) m_unlink(tmpfile); - return (fd == -1 ? -1 : 0); + return fd == -1 ? -1 : 0; } #endif /* HAVE_LIBLOCKFILE */