]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_compat: put back match/target module if init fail
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sat, 23 Jul 2016 08:00:31 +0000 (16:00 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 23 Jul 2016 10:22:07 +0000 (12:22 +0200)
commitfc246371e63e7931e9e4d7d047029b1eda72273c
tree024cb3652c7f57ae1dc8ef1df2333a2d4a2c581d
parenta8e03635131e275ae2f3fbcf8a20994cdd8a0dd4
netfilter: nft_compat: put back match/target module if init fail

If the user specify the invalid NFTA_MATCH_INFO/NFTA_TARGET_INFO attr
or memory alloc fail, we should call module_put to the related match
or target. Otherwise, we cannot remove the module even nobody use it.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_compat.c