X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fiptables.c;h=20dce658b95e4edd1767a4b36e341e1308ea7759;hb=610204218564e01513607a0f077c33145f2b41f7;hp=0103725fa4a343fa712043a8f1a2162fd21a104e;hpb=7b64cc91d3307179557b25b6ece2349a088f4294;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index 0103725f..20dce658 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -111,7 +111,8 @@ static int iptables_config (const char *key, const char *value) else return (1); - ip_chain_t temp, *final, **list; + ip_chain_t temp = { 0 }; + ip_chain_t *final, **list; char *table; int table_len; char *chain; @@ -121,8 +122,6 @@ static int iptables_config (const char *key, const char *value) char *fields[4]; int fields_num; - memset (&temp, 0, sizeof (temp)); - value_copy = strdup (value); if (value_copy == NULL) {