mem_calloc -> p_new
[apps/madmutt.git] / history.c
index 66559c0..304c7b9 100644 (file)
--- a/history.c
+++ b/history.c
@@ -11,6 +11,8 @@
 # include "config.h"
 #endif
 
+#include <lib-lib/mem.h>
+
 #include "mutt.h"
 #include "history.h"
 #include "lib/mem.h"
@@ -33,13 +35,13 @@ static void init_history (struct history *h)
   if (OldSize) {
     if (h->hist) {
       for (i = 0; i < OldSize; i++)
-        mem_free (&h->hist[i]);
-      mem_free (&h->hist);
+        p_delete(&h->hist[i]);
+      p_delete(&h->hist);
     }
   }
 
   if (HistSize)
-    h->hist = mem_calloc (HistSize, sizeof (char *));
+    h->hist = p_new(char *, HistSize);
 
   h->cur = 0;
   h->last = 0;