iptables plugin: Fix a segfault in the shutdown code.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 May 2007 21:06:20 +0000 (23:06 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 May 2007 21:06:20 +0000 (23:06 +0200)
That's the problem with macros: `for (...) sfree (ptr);' doesn't work.

src/iptables.c

index 5f2745f..c48199a 100644 (file)
@@ -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);