aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-23 21:54:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-23 21:54:26 +0000
commit59d6fe4f5787005f48bfd9fe32d5b85e763312b4 (patch)
tree9974a03bfbd256accbe09ec39212e6521ce58f58
parentaf06f40be724445d2084503e3f17448af17ff779 (diff)
downloadrspamd-59d6fe4f5787005f48bfd9fe32d5b85e763312b4.tar.gz
rspamd-59d6fe4f5787005f48bfd9fe32d5b85e763312b4.zip
Fix setting of the expression element.
-rw-r--r--src/libutil/expression.c2
-rw-r--r--src/plugins/regexp.c1
2 files changed, 2 insertions, 1 deletions
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;