]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
netlink: suppress useless variable
authorEric Leblond <eric@regit.org>
Wed, 2 Oct 2013 23:08:06 +0000 (01:08 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Oct 2013 10:39:35 +0000 (12:39 +0200)
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/netlink.c

index b1e44ad05dccc307d8282ac101fa4ea6cfea624b..6f3002bcc1a25bfc207cdd73d66e05cce9ee353f 100644 (file)
@@ -441,7 +441,6 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h,
                               const struct location *loc)
 {
        struct nft_rule_list *rule_cache;
-       struct nft_rule *nlr;
 
        rule_cache = mnl_nft_rule_dump(nf_sock, h->family);
        if (rule_cache == NULL)
@@ -450,9 +449,7 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h,
                                        strerror(errno));
 
        mnl_batch_begin();
-       nlr = alloc_nft_rule(h);
        nft_rule_list_foreach(rule_cache, flush_rule_cb, ctx);
-       nft_rule_free(nlr);
        nft_rule_list_free(rule_cache);
        mnl_batch_end();
        return 0;