From: Thomas Glanzmann Date: Mon, 30 Aug 2004 20:03:35 +0000 (+0000) Subject: Fix a memory leak in the generic spam detection code. X-Git-Tag: mutt-1-5-15-rel~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7348880167e58e17f9bbaf615aa591794ec5048f;p=mutt Fix a memory leak in the generic spam detection code. --- diff --git a/init.c b/init.c index c07df0e1..2a66a296 100644 --- a/init.c +++ b/init.c @@ -639,8 +639,11 @@ static int parse_spam_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER * mutt_extract_token (&templ, s, 0); /* Add to the spam list. */ - if (add_to_spam_list (&SpamList, buf->data, templ.data, err) != 0) + if (add_to_spam_list (&SpamList, buf->data, templ.data, err) != 0) { + FREE(&templ.data); return -1; + } + FREE(&templ.data); } /* If not, try to remove from the nospam list. */