]> source.dussan.org Git - rspamd.git/commitdiff
Fix setting of the expression element.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Mar 2015 21:54:26 +0000 (21:54 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Mar 2015 21:54:26 +0000 (21:54 +0000)
src/libutil/expression.c
src/plugins/regexp.c

index 04ddc8750cb30b50516d804d2b151f67f6330ce1..77627becfb52bf9ad6a3eb1534ccaeb5b45c0099 100644 (file)
@@ -520,7 +520,7 @@ rspamd_parse_expression (const gchar *line, gsize len,
                }
        }
 
-       if (*target) {
+       if (target) {
                *target = e;
                rspamd_mempool_add_destructor (pool,
                        (rspamd_mempool_destruct_t)rspamd_expression_destroy, e);
index 159399dfd08b82d562145608cdd63581ddca066f..c5f3203b37ac11e0b019e25020381928816b092b 100644 (file)
@@ -84,6 +84,7 @@ read_regexp_expression (rspamd_mempool_t * pool,
                return FALSE;
        }
 
+       g_assert (e != NULL);
        chain->expr = e;
 
        return TRUE;