aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 15:01:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 15:01:55 +0000
commitf7aee39a9dc81ae437e1dcc651a7335a7ae071d3 (patch)
tree491a5422b5e32feabad05fca0cdb9ae196f731a5 /src/client
parent376b5cac00888b7d3203f2c3e5611b0d25044c6b (diff)
downloadrspamd-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.c14
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) {