diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-13 15:01:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-13 15:01:55 +0000 |
commit | f7aee39a9dc81ae437e1dcc651a7335a7ae071d3 (patch) | |
tree | 491a5422b5e32feabad05fca0cdb9ae196f731a5 /src/client | |
parent | 376b5cac00888b7d3203f2c3e5611b0d25044c6b (diff) | |
download | rspamd-f7aee39a9dc81ae437e1dcc651a7335a7ae071d3.tar.gz rspamd-f7aee39a9dc81ae437e1dcc651a7335a7ae071d3.zip |
[Fix] Fix various issues found by PVS Studio
https://www.viva64.com/
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/rspamc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 0568692b4..927097e18 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -680,15 +680,15 @@ add_options (GQueue *opts) if (kv == NULL || kv[1] == NULL) { ADD_CLIENT_HEADER (opts, *hdr, ""); - - if (kv) { - g_strfreev (kv); - } } else { ADD_CLIENT_HEADER (opts, kv[0], kv[1]); } + if (kv) { + g_strfreev (kv); + } + hdr ++; } } @@ -1006,9 +1006,9 @@ rspamc_counters_sort (const ucl_object_t **o1, const ucl_object_t **o2) order2 = ucl_object_toint (elt2); } } - - g_strfreev (args); } + + g_strfreev (args); } return (inverse ? (order2 - order1) : (order1 - order2)); @@ -2008,7 +2008,7 @@ main (gint argc, gchar **argv, gchar **env) g_queue_free_full (kwattrs, g_free); /* Wait for children processes */ - cur = g_list_first (children); + cur = children ? g_list_first (children) : NULL; ret = 0; while (cur) { |