aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-06 16:28:34 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-06 16:28:34 +0000
commitba285a1b84465d7de1bd55e27c9c74a665738416 (patch)
tree0a161b98337dd955335f8fbc8ed009ec7907b36b
parent9943abd0403ae1326b1c80ab9754232bd00498ea (diff)
downloadrspamd-ba285a1b84465d7de1bd55e27c9c74a665738416.tar.gz
rspamd-ba285a1b84465d7de1bd55e27c9c74a665738416.zip
[Minor] Plug leak on error path
-rw-r--r--src/libmime/mime_expressions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index aac9e518b..ab863aa71 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -875,6 +875,7 @@ set:
200,
"no header name in header regexp: '%s'",
mime_atom->str);
+ rspamd_regexp_unref (mime_atom->d.re->regexp);
goto err;
}
@@ -892,12 +893,13 @@ set:
rspamd_regexp_unref (own_re);
}
else {
- /* We have header regexp, but no header name is detected */
+ /* We have selector regexp, but no selector name is detected */
g_set_error (err,
rspamd_mime_expr_quark (),
200,
"no selector name in selector regexp: '%s'",
mime_atom->str);
+ rspamd_regexp_unref (mime_atom->d.re->regexp);
goto err;
}
}