netfilter: nf_tables: release flowtable hooks
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 9 Mar 2018 17:56:26 +0000 (18:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 11 Mar 2018 20:24:56 +0000 (21:24 +0100)
Otherwise we leak this array.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 558593e6a0a3b507a967ec1f75ddc15228807c09..c4acc7340eb1014bb0941bf6054908c178595770 100644 (file)
@@ -5423,6 +5423,7 @@ err:
 static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable)
 {
        cancel_delayed_work_sync(&flowtable->data.gc_work);
+       kfree(flowtable->ops);
        kfree(flowtable->name);
        flowtable->data.type->free(&flowtable->data);
        rhashtable_destroy(&flowtable->data.rhashtable);