From 625fada30109ed88dce80fa7459bc252544e743a Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Tue, 11 Dec 2018 15:29:57 -0800 Subject: [PATCH] Fix memory leak in smime.c. smime_application_smime_handler() was not freeing the BODY returned by smime_handle_entity(). --- smime.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) -- 2.40.0