Release existing caches from nft_ctx_free(). Still, the iface cache
should be good to place it in the nft_ctx structure.
Joint work with Pablo Neira.
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static void nft_ctx_free(const struct nft_ctx *ctx)
{
+ iface_cache_release();
+ cache_release(&nft->cache);
xfree(ctx);
}
erec_print_list(stderr, &msgs, nft->debug_mask);
scanner_destroy(scanner);
- cache_release(&nft->cache);
return rc;
}
err:
erec_print_list(stderr, &msgs, nft->debug_mask);
scanner_destroy(scanner);
- cache_release(&nft->cache);
return rc;
}
}
xfree(buf);
- iface_cache_release();
netlink_close_sock(nf_sock);
nft_ctx_free(nft);
nft_exit();