summaryrefslogtreecommitdiffstats
path: root/src/libserver/re_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-21 19:22:26 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-21 19:22:26 +0100
commit86e6cb7edb28d01dd888db9d38ef7c14978d56d3 (patch)
treeb13d34a42b82f76a5f64513368a3dd3cc0d59408 /src/libserver/re_cache.c
parent1e9750de3537a7f6902c070ab2010d4c6288d4c0 (diff)
downloadrspamd-86e6cb7edb28d01dd888db9d38ef7c14978d56d3.tar.gz
rspamd-86e6cb7edb28d01dd888db9d38ef7c14978d56d3.zip
[Minor] Fix use after free
Reported by: @citrin
Diffstat (limited to 'src/libserver/re_cache.c')
-rw-r--r--src/libserver/re_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index 631981b30..4d631da01 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -2065,15 +2065,15 @@ rspamd_re_cache_compile_timer_cb (EV_P_ ev_timer *w, int revents )
g_free (hs_pats[j]);
}
+ err = g_error_new (rspamd_re_cache_quark (), EINVAL,
+ "cannot create tree of regexp when processing '%s': %s",
+ hs_pats[hs_errors->expression], hs_errors->message);
g_free (hs_pats);
g_free (hs_exts);
close (fd);
unlink (path);
hs_free_compile_error (hs_errors);
- err = g_error_new (rspamd_re_cache_quark (), EINVAL,
- "cannot create tree of regexp when processing '%s': %s",
- hs_pats[hs_errors->expression], hs_errors->message);
rspamd_re_cache_compile_err (EV_A_ w, err, cbdata);
return;