]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: fix userdata memleak
authorJose M. Guisado Gomez <guigom@riseup.net>
Sun, 27 Sep 2020 08:36:22 +0000 (10:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Sep 2020 09:40:22 +0000 (11:40 +0200)
commite67f8f757835ea1ce1f6dd2ff8fa5e55afa48146
treef131094476509cccee0fe1967901cefe86577b54
parent8d8f64191786761ad51602b011a99602f7fef155
netfilter: nf_tables: fix userdata memleak

When userdata was introduced for tables and objects its allocation was
only freed inside the error path of the new{table, object} functions.

Free user data inside corresponding destroy functions for tables and
objects.

Fixes: 56d1146d3f1a ("netfilter: nf_tables: add userdata support for nft_object")
Fixes: 920bdb8565bf ("netfilter: nf_tables: add userdata attributes to nft_table")
Signed-off-by: Jose M. Guisado Gomez <guigom@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c