From: Vsevolod Stakhov Date: Mon, 23 Mar 2015 21:54:26 +0000 (+0000) Subject: Fix setting of the expression element. X-Git-Tag: 0.9.0~449 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=59d6fe4f5787005f48bfd9fe32d5b85e763312b4;p=rspamd.git Fix setting of the expression element. --- diff --git a/src/libutil/expression.c b/src/libutil/expression.c index 04ddc8750..77627becf 100644 --- a/src/libutil/expression.c +++ b/src/libutil/expression.c @@ -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); diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 159399dfd..c5f3203b3 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -84,6 +84,7 @@ read_regexp_expression (rspamd_mempool_t * pool, return FALSE; } + g_assert (e != NULL); chain->expr = e; return TRUE;