Use p_new instead of xmalloc()
[apps/madmutt.git] / hook.c
diff --git a/hook.c b/hook.c
index db0b1a9..6a72868 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -14,6 +14,7 @@
 #include <lib-crypt/crypt.h>
 
 #include "alias.h"
+#include "pattern.h"
 
 #define ERROR_STOP      0
 
@@ -191,7 +192,7 @@ static void delete_hook (HOOK * h)
   if (h->rx.rx) {
     regfree (h->rx.rx);
   }
-  mutt_pattern_free (&h->pattern);
+  pattern_list_wipe(&h->pattern);
   p_delete(&h);
 }