From: Kevin McCarthy Date: Tue, 11 Dec 2018 23:29:57 +0000 (-0800) Subject: Fix memory leak in smime.c. X-Git-Tag: mutt-1-12-rel~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=625fada30109ed88dce80fa7459bc252544e743a;p=mutt Fix memory leak in smime.c. smime_application_smime_handler() was not freeing the BODY returned by smime_handle_entity(). --- diff --git a/smime.c b/smime.c index b13a91a3..940c003b 100644 --- a/smime.c +++ b/smime.c @@ -2097,7 +2097,16 @@ bail: int smime_application_smime_handler (BODY *m, STATE *s) { - return smime_handle_entity (m, s, NULL) ? 0 : -1; + int rv = -1; + BODY *tattach; + + tattach = smime_handle_entity (m, s, NULL); + if (tattach) + { + rv = 0; + mutt_free_body (&tattach); + } + return rv; } int smime_send_menu (HEADER *msg)