]> diplodocus.org Git - nmh/blobdiff - uip/repl.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / repl.c
index 40c217b3e72110453f74c00b08a657b53882a97f..5f2886a2a8b66f0538ed3a042eef15d5b8815aab 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * repl.c -- reply to a message
+/* repl.c -- reply to a message
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -9,6 +8,7 @@
 #include <h/mh.h>
 #include <h/mime.h>
 #include <h/utils.h>
+#include "sbr/m_maildir.h"
 
 #define REPL_SWITCHES \
     X("group", 0, GROUPSW) \
@@ -39,7 +39,7 @@
     X("width columns", 0, WIDTHSW) \
     X("version", 0, VERSIONSW) \
     X("help", 0, HELPSW) \
-    X("file file", 4, FILESW) /* interface from msh */ \
+    X("file file", 4, FILESW) \
     X("build", 5, BILDSW) /* interface from mhe */ \
     X("atfile", 0, ATFILESW) \
     X("noatfile", 0, NOATFILESW) \
@@ -239,7 +239,7 @@ main (int argc, char **argv)
                    if (fcc)
                        fcc = add (", ", fcc);
                    fcc = add (cp, fcc);
-                    mh_xfree(dp);
+                    free(dp);
                    continue;
 
                case FILESW: 
@@ -336,13 +336,11 @@ main (int argc, char **argv)
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
-           else
-               folder = pluspath (cp);
+            folder = pluspath (cp);
        } else {
            if (msg)
                adios (NULL, "only one message at a time!");
-           else
-               msg = cp;
+            msg = cp;
        }
     }