summaryrefslogtreecommitdiffstats
path: root/ip6tables.c
diff options
context:
space:
mode:
authorMartin Josefsson <gandalf@wlug.westbo.se>2003-05-05 19:33:40 +0000
committerMartin Josefsson <gandalf@wlug.westbo.se>2003-05-05 19:33:40 +0000
commit8371e15a49d422755fbd185ab8415b9b12ec9d9a (patch)
tree84dfa4f27819d743b20800292b24ce8dde3c7b69 /ip6tables.c
parenta5bb0a65c15ab040bc6b6ee2d6637fec50e80b13 (diff)
Fix the previous fix
No more segfaults or compilewarnings.
Diffstat (limited to 'ip6tables.c')
-rw-r--r--ip6tables.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ip6tables.c b/ip6tables.c
index d2508825..17bdb4e5 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -1670,7 +1670,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
const char *modprobe = NULL;
int proto_used = 0;
char icmp6p[] = "icmpv6";
- int no_handle = 0;
memset(&fw, 0, sizeof(fw));
@@ -2148,10 +2147,8 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
chain, IP6T_FUNCTION_MAXNAMELEN);
/* only allocate handle if we weren't called with a handle */
- if (!*handle) {
+ if (!*handle)
*handle = ip6tc_init(*table);
- no_handle = 1;
- }
if (!*handle) {
/* try to insmod the module if iptc_init failed */
@@ -2296,8 +2293,5 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
if (verbose > 1)
dump_entries6(*handle);
- if (no_handle)
- ip6tc_free(handle);
-
return ret;
}