diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-21 11:25:19 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-21 11:25:19 +0000 |
commit | 8ab5dd791fd53b7d88182cf264bc68221f814e89 (patch) | |
tree | d727de85b0f93de045580349a375178363c84483 /src | |
parent | 52f4b73c3fc59786eef51c178f6513bcfd6e718d (diff) | |
download | rspamd-8ab5dd791fd53b7d88182cf264bc68221f814e89.tar.gz rspamd-8ab5dd791fd53b7d88182cf264bc68221f814e89.zip |
[Minor] Fix crash on empty debug module check
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/logger.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c index 6b83ddb05..4d28e28fd 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -1393,6 +1393,10 @@ rspamd_logger_add_debug_module (const gchar *mname) { struct rspamd_log_module *m; + if (mname == NULL) { + return (guint)-1; + } + if (log_modules == NULL) { log_modules = g_malloc0 (sizeof (*log_modules)); log_modules->modules = g_hash_table_new (rspamd_strcase_hash, |