]> diplodocus.org Git - nmh/blobdiff - sbr/lock_file.c
Added tests of MMDF mailbox format to test-eom-align.
[nmh] / sbr / lock_file.c
index 19cad331edb92dc501fb5fea2d416d1672581bf7..2c8b1c7531ae9ea286de318e1bd52c88d119c894 100644 (file)
@@ -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 */