exit mem_realloc, enters p_realloc/xrealloc.
[apps/madmutt.git] / crypt-gpgme.c
index 0c0bbf7..8bb7866 100644 (file)
@@ -33,7 +33,6 @@
 #include "recvattach.h"
 #include "sort.h"
 
-#include "lib/mem.h"
 #include "lib/intl.h"
 #include "lib/str.h"
 #include "lib/debug.h"
@@ -554,7 +553,7 @@ static gpgme_key_t *create_recipient_set (const char *keylist,
           err = gpgme_get_key (context, buf, &key, 0);
 
         if (!err) {
-          mem_realloc (&rset, sizeof (*rset) * (rset_n + 1));
+          p_realloc(&rset, rset_n + 1);
           rset[rset_n++] = key;
         }
         else {
@@ -568,7 +567,7 @@ static gpgme_key_t *create_recipient_set (const char *keylist,
   }
 
   /* NULL terminate.  */
-  mem_realloc (&rset, sizeof (*rset) * (rset_n + 1));
+  p_realloc(&rset, rset_n + 1);
   rset[rset_n++] = NULL;
 
   if (context)
@@ -3259,7 +3258,7 @@ static crypt_key_t *crypt_select_key (crypt_key_t * keys,
 
     if (i == keymax) {
       keymax += 20;
-      mem_realloc (&key_table, sizeof (crypt_key_t *) * keymax);
+      p_realloc(&key_table, keymax);
     }
 
     key_table[i++] = k;
@@ -3768,7 +3767,7 @@ static char *find_keys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc,
 #endif
 
       keylist_size += str_len (s) + 4 + 1;
-      mem_realloc (&keylist, keylist_size);
+      p_realloc(&keylist, keylist_size);
       sprintf (keylist + keylist_used, "%s0x%s%s",      /* __SPRINTF_CHECKED__ */
                keylist_used ? " " : "", s, forced_valid ? "!" : "");
     }