]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix memory leak in language detector during reloads
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 3 May 2019 15:00:24 +0000 (16:00 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 3 May 2019 15:00:24 +0000 (16:00 +0100)
src/libmime/lang_detection.c

index 7bfcf01648c0ade243f762cf5f90d15b3a12306c..143dc3f383160edd2771a11d0462734d696fe692 100644 (file)
@@ -752,6 +752,8 @@ rspamd_language_detector_dtor (struct rspamd_lang_detector *d)
                kh_foreach_key (d->stop_words_norm, tok, {
                        g_free (tok); /* String is embedded and freed automatically */
                });
+
+               kh_destroy (rspamd_stopwords_hash, d->stop_words_norm);
        }
 }