diff options
author | rusty <rusty> | 2001-01-07 06:55:24 +0000 |
---|---|---|
committer | rusty <rusty> | 2001-01-07 06:55:24 +0000 |
commit | 4d4bea46731a069c5b9b6765784dc498f21ddf77 (patch) | |
tree | 1973e877d6978dd8291301c931ea569ca2ee624b /iptables-standalone.c | |
parent | 403378b1c078df43727c96c2c569d35c73c3277d (diff) |
Revert malloc. Why?
Diffstat (limited to 'iptables-standalone.c')
-rw-r--r-- | iptables-standalone.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/iptables-standalone.c b/iptables-standalone.c index 102c0f3..b891e97 100644 --- a/iptables-standalone.c +++ b/iptables-standalone.c @@ -35,21 +35,14 @@ main(int argc, char *argv[]) { int ret; char *table = "filter"; - iptc_handle_t *handle; - - handle = (iptc_handle_t *) malloc(sizeof(iptc_handle_t)); - if (!handle) { - fprintf(stderr, "out of memory\n"); - exit(1); - } - memset(handle, 0, sizeof(iptc_handle_t)); + iptc_handle_t handle = NULL; program_name = "iptables"; program_version = NETFILTER_VERSION; - ret = do_command(argc, argv, &table, handle); + ret = do_command(argc, argv, &table, &handle); if (ret) - ret = iptc_commit(handle); + ret = iptc_commit(&handle); if (!ret) fprintf(stderr, "iptables: %s\n", |