]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Cleanup hs structures on cache destroy
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Dec 2015 17:39:04 +0000 (17:39 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Dec 2015 17:39:04 +0000 (17:39 +0000)
src/libserver/re_cache.c

index 77d5f24e62090f209a81786d85059936d92cf197..c893ceb0289f6835ec29be5d2b07b998673654c5 100644 (file)
@@ -143,6 +143,14 @@ rspamd_re_cache_destroy (struct rspamd_re_cache *cache)
                re_class = v;
                g_hash_table_iter_steal (&it);
                g_hash_table_unref (re_class->re);
+#ifdef WITH_HYPERSCAN
+               if (re_class->hs_db) {
+                       hs_free_database (re_class->hs_db);
+               }
+               if (re_class->hs_scratch) {
+                       hs_free_scratch (re_class->hs_scratch);
+               }
+#endif
                g_slice_free1 (sizeof (*re_class), re_class);
        }