Replace free() with mh_free0()
[mmh] / uip / new.c
index 9774729..25ee492 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -68,7 +68,7 @@ count_messages(char *field)
                }
        }
 
-       free(field);
+       mh_free0(&field);
 
        return total;
 }
@@ -134,11 +134,11 @@ get_msgnums(char *folder, char *sequences[])
                                        } else {
                                                old_msgnums = msgnums;
                                                msgnums = concat(old_msgnums, " ", this_msgnums, (void *)NULL);
-                                               free(old_msgnums);
-                                               free(this_msgnums);
+                                               mh_free0(&old_msgnums);
+                                               mh_free0(&this_msgnums);
                                        }
                                }
-                               free(cp);
+                               mh_free0(&cp);
                        } else {
                                /* and here */
                                if (seq_in_list(name, sequences)) {
@@ -148,8 +148,8 @@ get_msgnums(char *folder, char *sequences[])
                                        } else {
                                                old_msgnums = msgnums;
                                                msgnums = concat(old_msgnums, " ", this_msgnums, (void *)NULL);
-                                               free(old_msgnums);
-                                               free(this_msgnums);
+                                               mh_free0(&old_msgnums);
+                                               mh_free0(&this_msgnums);
                                        }
                                }
                        }