aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.c
diff options
context:
space:
mode:
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);