diff options
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 3 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index d0d1919202..ad39bf6405 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -1120,7 +1120,8 @@ int arpt_register_table(struct arpt_table *table, | |||
1120 | return ret; | 1120 | return ret; |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | if (xt_register_table(table, &bootstrap, newinfo) != 0) { | 1123 | ret = xt_register_table(table, &bootstrap, newinfo); |
1124 | if (ret != 0) { | ||
1124 | xt_free_table_info(newinfo); | 1125 | xt_free_table_info(newinfo); |
1125 | return ret; | 1126 | return ret; |
1126 | } | 1127 | } |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 706c0025ec..7aaaf92efb 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -2113,7 +2113,8 @@ int ipt_register_table(struct xt_table *table, const struct ipt_replace *repl) | |||
2113 | return ret; | 2113 | return ret; |
2114 | } | 2114 | } |
2115 | 2115 | ||
2116 | if (xt_register_table(table, &bootstrap, newinfo) != 0) { | 2116 | ret = xt_register_table(table, &bootstrap, newinfo); |
2117 | if (ret != 0) { | ||
2117 | xt_free_table_info(newinfo); | 2118 | xt_free_table_info(newinfo); |
2118 | return ret; | 2119 | return ret; |
2119 | } | 2120 | } |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 2e72f89a70..0b5bd5587a 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -1281,7 +1281,8 @@ int ip6t_register_table(struct xt_table *table, | |||
1281 | return ret; | 1281 | return ret; |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | if (xt_register_table(table, &bootstrap, newinfo) != 0) { | 1284 | ret = xt_register_table(table, &bootstrap, newinfo); |
1285 | if (ret != 0) { | ||
1285 | xt_free_table_info(newinfo); | 1286 | xt_free_table_info(newinfo); |
1286 | return ret; | 1287 | return ret; |
1287 | } | 1288 | } |