aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_expressions.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-20 12:55:09 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-20 12:55:09 +0000
commit7fab24199ed087a2680d1af59da3fdf51fc21239 (patch)
tree58cdabd657ffabe5de9867ffcb75ed9e323c1018 /src/libmime/mime_expressions.c
parentfec1c25ef6fba71bc260c367c0e478b15ffac302 (diff)
downloadrspamd-7fab24199ed087a2680d1af59da3fdf51fc21239.tar.gz
rspamd-7fab24199ed087a2680d1af59da3fdf51fc21239.zip
[Minor] Cleanup memory on the error path
Diffstat (limited to 'src/libmime/mime_expressions.c')
-rw-r--r--src/libmime/mime_expressions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index 9d1362e28..d3d40c870 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -827,6 +827,7 @@ set:
g_set_error (err, rspamd_mime_expr_quark (), 320,
"re_conditions is not a table for '%s'",
mime_atom->str);
+ rspamd_regexp_unref (mime_atom->d.re->regexp);
goto err;
}
@@ -838,6 +839,7 @@ set:
g_set_error (err, rspamd_mime_expr_quark (), 320,
"condition for '%s' is invalid, must be function",
mime_atom->str);
+ rspamd_regexp_unref (mime_atom->d.re->regexp);
goto err;
}