]> diplodocus.org Git - nmh/blobdiff - uip/sortm.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / sortm.c
index 84f8e085904025b6678c9d40aab93a2f19991a38..2e2809a2b28547b7598bad7a6fea16fd14d9cbe3 100644 (file)
@@ -8,7 +8,7 @@
 #include <h/mh.h>
 #include <h/tws.h>
 #include <h/utils.h>
-#include "../sbr/m_maildir.h"
+#include "sbr/m_maildir.h"
 
 #define SORTM_SWITCHES \
     X("datefield field", 0, DATESW) \
@@ -43,7 +43,7 @@ struct smsg {
 static struct smsg *smsgs;
 int nmsgs;
 
-char *subjsort = (char *) 0;    /* sort on subject if != 0 */
+char *subjsort;                 /* sort on subject if != 0 */
 time_t datelimit = 0;
 int submajor = 0;              /* if true, sort on subject-major */
 int verbose;
@@ -390,8 +390,8 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
                      msg, compnum);
                check_failed = 1;
            }
-            mh_xfree(datecomp);
-            mh_xfree(subjcomp);
+            free(datecomp);
+            free(subjcomp);
            fclose (in);
            return (0);
 
@@ -453,7 +453,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
        smsg->s_subj = subjcomp;
     }
     fclose (in);
-    mh_xfree(datecomp);
+    free(datecomp);
 
     return (1);
 }