]> diplodocus.org Git - nmh/blobdiff - uip/rcvpack.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / rcvpack.c
index 6235e5e96625b9247ac986ba7628b2bee5536af5..7fc7602fe454e43d49f3a61622f1ccf8c93b8c6a 100644 (file)
@@ -73,8 +73,7 @@ main (int argc, char **argv)
        }
        if (file)
            adios (NULL, "only one file at a time!");
-       else
-           file = cp;
+        file = cp;
     }
 
     if (!file)
@@ -87,7 +86,7 @@ main (int argc, char **argv)
        done (RCV_MBX);
 
     /* append the message */
-    if (mbx_copy (file, mbx_style, md, fileno(stdin), 1, NULL, 0) == NOTOK) {
+    if (mbx_copy (file, mbx_style, md, fileno(stdin), NULL) == NOTOK) {
        mbx_close (file, md);
        done (RCV_MBX);
     }