aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-18 12:54:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-18 12:54:16 +0100
commit8d393a012f52e57ab6bc7cc0c8da0c64ccd10ea9 (patch)
tree67d8776790588c4bc85914749e7539eca39259ae /src/libutil/util.c
parentda60dec1d43594695255180ed9dbcb680305e941 (diff)
downloadrspamd-8d393a012f52e57ab6bc7cc0c8da0c64ccd10ea9.tar.gz
rspamd-8d393a012f52e57ab6bc7cc0c8da0c64ccd10ea9.zip
[CritFix] Fix maps after reload
Issue: #2293
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r--src/libutil/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index 3193f8e8d..4616bedc0 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -2189,6 +2189,19 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx,
magic_load (ctx->libmagic, cfg->magic_file);
}
+ rspamd_free_zstd_dictionary (ctx->in_dict);
+ rspamd_free_zstd_dictionary (ctx->out_dict);
+
+ if (ctx->out_zstream) {
+ ZSTD_freeCStream (ctx->out_zstream);
+ ctx->out_zstream = NULL;
+ }
+
+ if (ctx->in_zstream) {
+ ZSTD_freeDStream (ctx->in_zstream);
+ ctx->in_zstream = NULL;
+ }
+
if (cfg->zstd_input_dictionary) {
ctx->in_dict = rspamd_open_zstd_dictionary (
cfg->zstd_input_dictionary);