mem_calloc -> p_new
[apps/madmutt.git] / hcache.c
index e31aabc..e69a591 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -609,7 +609,7 @@ HEADER *mutt_hcache_restore (const unsigned char *d, HEADER ** oh)
 void *
 mutt_hcache_open(const char *path, const char *folder)
 {
-  struct header_cache *h = mem_calloc(1, sizeof (HEADER_CACHE));
+  struct header_cache *h = p_new(HEADER_CACHE, 1);
   int    flags = VL_OWRITER | VL_OCREAT;
   h->db = NULL;
   h->folder = str_dup(folder);
@@ -731,7 +731,7 @@ mutt_hcache_delete(void *db, const char *filename,
 
 void *mutt_hcache_open (const char *path, const char *folder)
 {
-  struct header_cache *h = mem_calloc (1, sizeof (HEADER_CACHE));
+  struct header_cache *h = p_new(HEADER_CACHE, 1);
   int pagesize =
     atoi (HeaderCachePageSize) ? atoi (HeaderCachePageSize) : 16384;
   h->db = NULL;