]> granicus.if.org Git - mutt/commitdiff
Thou shall not use dangling pointers.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 2 Feb 1999 17:58:07 +0000 (17:58 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 2 Feb 1999 17:58:07 +0000 (17:58 +0000)
pgp.c

diff --git a/pgp.c b/pgp.c
index 18269ad9cba245555219483c3c2b9bbc3ba1fa78..781eb2a2251ef01903590e402e558f835c9e2c83 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -1289,13 +1289,14 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
       key = k_info;
 
     keyID = pgp_keyid (key);
-    pgp_free_key (&key);
     
     keylist_size += mutt_strlen (keyID) + 4;
     safe_realloc ((void **)&keylist, keylist_size);
     sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "",
             keyID);
     keylist_used = mutt_strlen (keylist);
+
+    pgp_free_key (&key);
   }
   rfc822_free_address (&tmp);
   return (keylist);