]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Plug minor memory leak in regexps creation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 Apr 2016 13:18:44 +0000 (14:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 Apr 2016 13:19:25 +0000 (14:19 +0100)
src/libmime/mime_expressions.c

index c107703a99a42dbfd7d5731fa8c45d071087b53c..a29b52252062d70ce69656d71cecffc16504daa0 100644 (file)
@@ -355,9 +355,13 @@ rspamd_mime_expr_parse_regexp_atom (rspamd_mempool_t * pool, const gchar *line,
        g_string_free (re_flags, TRUE);
 
        if (result->regexp == NULL || err != NULL) {
-               msg_warn_pool ("could not read regexp: %s while reading regexp %s",
-                               err ? err->message : "unknown error",
-                                               src);
+               msg_warn_pool ("could not read regexp: %s while reading regexp %e",
+                               err, src);
+
+               if (err) {
+                       g_error_free (err);
+               }
+
                return NULL;
        }