summaryrefslogtreecommitdiffstats
path: root/net/netrom/Makefile
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-02-21 13:31:49 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2022-02-22 08:28:04 +0100
commitdad3bdeef45f81a6e90204bcc85360bb76eccec7 (patch)
treee361eff044ada644ac45547e50d4b0af47d11f03 /net/netrom/Makefile
parentnetfilter: nft_limit: fix stateful object memory leak (diff)
downloadlinux-dad3bdeef45f81a6e90204bcc85360bb76eccec7.tar.xz
linux-dad3bdeef45f81a6e90204bcc85360bb76eccec7.zip
netfilter: nf_tables: fix memory leak during stateful obj update
stateful objects can be updated from the control plane. The transaction logic allocates a temporary object for this purpose. The ->init function was called for this object, so plain kfree() leaks resources. We must call ->destroy function of the object. nft_obj_destroy does this, but it also decrements the module refcount, but the update path doesn't increment it. To avoid special-casing the update object release, do module_get for the update case too and release it via nft_obj_destroy(). Fixes: d62d0ba97b58 ("netfilter: nf_tables: Introduce stateful object update operation") Cc: Fernando Fernandez Mancera <ffmancera@riseup.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netrom/Makefile')
0 files changed, 0 insertions, 0 deletions