From: Florian Forster Date: Tue, 8 May 2007 21:06:20 +0000 (+0200) Subject: iptables plugin: Fix a segfault in the shutdown code. X-Git-Tag: collectd-4.0.0~46^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=00e7aa5a3440dcfb1778109600ee0613a030ebeb;p=collectd.git iptables plugin: Fix a segfault in the shutdown code. That's the problem with macros: `for (...) sfree (ptr);' doesn't work. --- diff --git a/src/iptables.c b/src/iptables.c index 5f2745f2..c48199ad 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -335,7 +335,9 @@ static int iptables_shutdown (void) int i; for (i = 0; i < chain_num; i++) + { sfree (chain_list[i]); + } sfree (chain_list); return (0);