36 lines
971 B
Diff
36 lines
971 B
Diff
From 1e4e4d2ea197c89c2f441a87d62e397f0e139f2e Mon Sep 17 00:00:00 2001
|
|
From: Georg Sauthoff <mail@georg.so>
|
|
Date: Mon, 11 Feb 2019 10:03:20 +0100
|
|
Subject: [PATCH 03/11] Fix memory leak (already fixed in trunk)
|
|
|
|
cf. https://sourceforge.net/p/bogofilter/code/HEAD/tree/trunk/bogofilter/src/wordlists.c#l360
|
|
---
|
|
src/wordlists.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/wordlists.c b/src/wordlists.c
|
|
index a5d529e..717dc80 100644
|
|
--- a/src/wordlists.c
|
|
+++ b/src/wordlists.c
|
|
@@ -329,7 +329,8 @@ bool configure_wordlist(const char *val)
|
|
char* filename;
|
|
int precedence;
|
|
|
|
- char *tmp = xstrdup(val);
|
|
+ char *t = xstrdup(val);
|
|
+ char *tmp = t;
|
|
|
|
ch= tmp[0]; /* save wordlist type (good/spam) */
|
|
tmp = spanword(tmp);
|
|
@@ -357,6 +358,7 @@ bool configure_wordlist(const char *val)
|
|
(void)spanword(tmp);
|
|
|
|
init_wordlist(listname, filename, precedence, type);
|
|
+ xfree(t);
|
|
|
|
return true;
|
|
}
|
|
--
|
|
2.20.1
|
|
|