]> diplodocus.org Git - nmh/blobdiff - sbr/folder_free.c
uip/sortm.c: Remove unused variable and dlocaltimenow() call.
[nmh] / sbr / folder_free.c
index cad86da..0b00819 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * folder_free.c -- free a folder/message structure
+/* folder_free.c -- free a folder/message structure
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -8,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 
 
 void
@@ -19,8 +18,7 @@ folder_free (struct msgs *mp)
     if (!mp)
        return;
 
-    if (mp->foldpath)
-       free (mp->foldpath);
+    mh_xfree(mp->foldpath);
 
     /* free the sequence names */
     for (i = 0; i < svector_size (mp->msgattrs); i++)
@@ -37,8 +35,7 @@ folder_free (struct msgs *mp)
     if (mp->seqhandle)
        lkfclosedata (mp->seqhandle, mp->seqname);
 
-    if (mp->seqname)
-       free (mp->seqname);
+    mh_xfree(mp->seqname);
 
     bvector_free (mp->attrstats);
     free (mp);                 /* free main folder structure */