Browse Source

[Minor] Fix crash on empty debug module check

tags/1.7.0
Vsevolod Stakhov 6 years ago
parent
commit
8ab5dd791f
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/libutil/logger.c

+ 4
- 0
src/libutil/logger.c View File

@@ -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,

Loading…
Cancel
Save