summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorgandalf <gandalf>2003-05-05 19:33:40 +0000
committergandalf <gandalf>2003-05-05 19:33:40 +0000
commitf9f3405cdad70aa21990e123e7875a59dbc59ea6 (patch)
tree84dfa4f27819d743b20800292b24ce8dde3c7b69 /iptables.c
parent3e1fd82ac5877049bed0b4d28b3134e73c36a729 (diff)
Fix the previous fix
No more segfaults or compilewarnings.
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/iptables.c b/iptables.c
index b2de559..67d30c9 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1668,7 +1668,6 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
char *protocol = NULL;
const char *modprobe = NULL;
int proto_used = 0;
- int no_handle = 0;
memset(&fw, 0, sizeof(fw));
@@ -2149,10 +2148,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
chain, IPT_FUNCTION_MAXNAMELEN);
/* only allocate handle if we weren't called with a handle */
- if (!*handle) {
+ if (!*handle)
*handle = iptc_init(*table);
- no_handle = 1;
- }
if (!*handle) {
/* try to insmod the module if iptc_init failed */
@@ -2297,8 +2294,5 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
if (verbose > 1)
dump_entries(*handle);
- if (no_handle)
- iptc_free(handle);
-
return ret;
}