From: Thomas Roessler Date: Tue, 2 Feb 1999 17:58:07 +0000 (+0000) Subject: Thou shall not use dangling pointers. X-Git-Tag: mutt-0-96-rel~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d9d94bfaba952966bf0887860d9199cac1b2cc2;p=mutt Thou shall not use dangling pointers. --- diff --git a/pgp.c b/pgp.c index 18269ad9..781eb2a2 100644 --- 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);