aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/logger_syslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/logger_syslog.c')
-rw-r--r--src/libutil/logger_syslog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/logger_syslog.c b/src/libutil/logger_syslog.c
index 15afabdb9..5a295b288 100644
--- a/src/libutil/logger_syslog.c
+++ b/src/libutil/logger_syslog.c
@@ -34,6 +34,12 @@ rspamd_log_syslog_init (rspamd_logger_t *logger, struct rspamd_config *cfg,
{
struct rspamd_syslog_logger_priv *priv;
+ if (!cfg) {
+ g_set_error (err, SYSLOG_LOG_QUARK, EINVAL,
+ "no log config specified");
+ return NULL;
+ }
+
priv = g_malloc0 (sizeof (*priv));
priv->log_facility = cfg->log_facility;