From 7fab24199ed087a2680d1af59da3fdf51fc21239 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 20 Mar 2022 12:55:09 +0000 Subject: [PATCH] [Minor] Cleanup memory on the error path --- src/libmime/mime_expressions.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5