]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: x_tables: fix xt_register_table error propagation
authorPatrick McHardy <kaber@trash.net>
Tue, 27 Jun 2006 10:00:09 +0000 (03:00 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 29 Jun 2006 23:57:40 +0000 (16:57 -0700)
When xt_register_table fails the error is not properly propagated back.
Based on patch by Lepton Wu <ytht.net@gmail.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c

index d0d19192026d9eb2327cf68a47a4ba1b23dc7fe5..ad39bf640567caaf81e71fd40a83886739611537 100644 (file)
@@ -1120,7 +1120,8 @@ int arpt_register_table(struct arpt_table *table,
                return ret;
        }
 
-       if (xt_register_table(table, &bootstrap, newinfo) != 0) {
+       ret = xt_register_table(table, &bootstrap, newinfo);
+       if (ret != 0) {
                xt_free_table_info(newinfo);
                return ret;
        }
index 706c0025ec5e43768c7c9dadfb30e3782c275d67..7aaaf92efb59ef755a6993a07023cd125a05faa5 100644 (file)
@@ -2113,7 +2113,8 @@ int ipt_register_table(struct xt_table *table, const struct ipt_replace *repl)
                return ret;
        }
 
-       if (xt_register_table(table, &bootstrap, newinfo) != 0) {
+       ret = xt_register_table(table, &bootstrap, newinfo);
+       if (ret != 0) {
                xt_free_table_info(newinfo);
                return ret;
        }
index 2e72f89a7019929f2da18cb74ef1ba26e9d1d74b..0b5bd5587a3e67926b9baf2322d7797b1c70dd34 100644 (file)
@@ -1281,7 +1281,8 @@ int ip6t_register_table(struct xt_table *table,
                return ret;
        }
 
-       if (xt_register_table(table, &bootstrap, newinfo) != 0) {
+       ret = xt_register_table(table, &bootstrap, newinfo);
+       if (ret != 0) {
                xt_free_table_info(newinfo);
                return ret;
        }