aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-10 16:20:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-10 16:20:55 +0000
commit4dcae5b51390cedeb274a94316bf2dc48ab6a80c (patch)
treef0df3c828f61cba6be64e0a972f0bf8edfc4ff29 /src/cfg_utils.c
parentd21d39f03385c42918946f77398f7fdeb7ae12dd (diff)
downloadrspamd-4dcae5b51390cedeb274a94316bf2dc48ab6a80c.tar.gz
rspamd-4dcae5b51390cedeb274a94316bf2dc48ab6a80c.zip
Do not crash on an invalid xml config.
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 35f0f44b7..dd6b00dcd 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -1025,10 +1025,14 @@ read_rspamd_config (struct config_file *cfg, const gchar *filename, const gchar
res = TRUE;
}
+ if (!res) {
+ return FALSE;
+ }
+
top = rspamd_rcl_config_init ();
err = NULL;
- if (!res || !rspamd_read_rcl_config (top, cfg, cfg->rcl_obj, &err)) {
+ if (!rspamd_read_rcl_config (top, cfg, cfg->rcl_obj, &err)) {
msg_err ("rcl parse error: %s", err->message);
return FALSE;
}