]> granicus.if.org Git - mutt/commitdiff
Fix a memory leak in the generic spam detection code.
authorThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Mon, 30 Aug 2004 20:03:35 +0000 (20:03 +0000)
committerThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Mon, 30 Aug 2004 20:03:35 +0000 (20:03 +0000)
init.c

diff --git a/init.c b/init.c
index c07df0e1a48599bd0a09cbc2b8694714b1fc20d7..2a66a2962654e6a9c0ef0276ab0a8d73a272e41e 100644 (file)
--- 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. */