Blob Blame History Raw
Index: bogofilter/src/wordlists.c
===================================================================
--- bogofilter/src/wordlists.c	(revision 7034)
+++ bogofilter/src/wordlists.c	(revision 7035)
@@ -265,9 +265,6 @@
 	xfree(i);
     }
 
-    if (commit)
-	word_lists = NULL;
-
     return err;
 }
 
Index: bogofilter/src/wordlists_base.c
===================================================================
--- bogofilter/src/wordlists_base.c	(revision 7034)
+++ bogofilter/src/wordlists_base.c	(revision 7035)
@@ -134,6 +134,8 @@
 	list = free_wordlistnode(list);
     }
 
+    word_lists = NULL;
+
     bogohome_cleanup();
 }
 
Index: bogofilter/NEWS
===================================================================
--- bogofilter/NEWS	(revision 7034)
+++ bogofilter/NEWS	(revision 7035)
@@ -17,6 +17,8 @@
 
 	2015-10-10
 
+	* Fix a memory leak in close_wordlists().
+
 	* Fix an out-of-bounds memory read in maint.c's discard_token().
 	  Found with clang 3.6's address sanitizer.