rationalize list handling in mutt a bit.
[apps/madmutt.git] / lib-crypt / pgp.c
index 0a35e6b..7147bf1 100644 (file)
@@ -1144,8 +1144,8 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc)
       }
       else if (r == -1) {
         p_delete(&keylist);
-        address_delete (&tmp);
-        address_delete (&addr);
+        address_list_wipe(&tmp);
+        address_list_wipe(&addr);
         return NULL;
       }
     }
@@ -1161,8 +1161,8 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc)
       if ((key = pgp_ask_for_key (buf, q->mailbox,
                                   KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) {
         p_delete(&keylist);
-        address_delete (&tmp);
-        address_delete (&addr);
+        address_list_wipe(&tmp);
+        address_list_wipe(&addr);
         return NULL;
       }
     }
@@ -1179,10 +1179,10 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc)
     keylist_used = m_strlen(keylist);
 
     pgp_free_key (&key);
-    address_delete (&addr);
+    address_list_wipe(&addr);
 
   }
-  address_delete (&tmp);
+  address_list_wipe(&tmp);
   return (keylist);
 }