diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-05-24 13:11:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-05-24 13:11:52 +0100 |
commit | 3b025570d4fd2bdd92c1a588ae494c4e2aa4db43 (patch) | |
tree | 5b325e29585bfc408ad9ea0bf13cdd55913e6820 /src/cfg_xml.c | |
parent | 08466d29088eff168eb153bef4aad59f02312a21 (diff) | |
download | rspamd-3b025570d4fd2bdd92c1a588ae494c4e2aa4db43.tar.gz rspamd-3b025570d4fd2bdd92c1a588ae494c4e2aa4db43.zip |
Fix several potential problems found by static analysis.
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r-- | src/cfg_xml.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c index 322772825..054377059 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -897,8 +897,10 @@ worker_foreach_callback (gpointer k, gpointer v, gpointer ud) GList *cur; GHashTable *worker_config; - if (!worker_options || (worker_config = g_hash_table_lookup (worker_options, &cd->wrk->type)) == NULL || - (cparam = g_hash_table_lookup (worker_config, k)) == NULL) { + if (!worker_options || (worker_config = g_hash_table_lookup (worker_options, &cd->wrk->type)) == NULL) { + return; + } + if ((cparam = g_hash_table_lookup (worker_config, k)) == NULL) { /* Try to use universal handler if there is no specific handler */ if ((cparam = g_hash_table_lookup (worker_config, "*")) != NULL) { if (cd->wrk->ctx != NULL) { @@ -1114,6 +1116,10 @@ handle_metric_symbol (struct config_file *cfg, struct rspamd_xml_userdata *ctx, group = "ungrouped"; } } + else { + group = "ungrouped"; + sym_def->description = NULL; + } g_hash_table_insert (metric->symbols, sym_def->name, value); |