]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
netlink: delete unused variable
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Mon, 17 Feb 2014 10:10:57 +0000 (11:10 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Feb 2014 23:19:38 +0000 (00:19 +0100)
The table object that is allocated is unused.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/netlink.c

index 07af1cb80ec926ea8926bf82da7ac0bbc2e9dcc5..2871888954b296c98fa51d26a651d0c1bc89c3a8 100644 (file)
@@ -676,7 +676,6 @@ int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h,
                        const struct location *loc)
 {
        struct nft_table_list *table_cache;
-       struct nft_table *nlt;
 
        table_cache = mnl_nft_table_dump(nf_sock, h->family);
        if (table_cache == NULL)
@@ -684,9 +683,7 @@ int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h,
                                        "Could not receive tables from kernel: %s",
                                        strerror(errno));
 
-       nlt = alloc_nft_table(h);
        nft_table_list_foreach(table_cache, list_table_cb, ctx);
-       nft_table_free(nlt);
        nft_table_list_free(table_cache);
        return 0;
 }