Re: [PATCH nf-next 1/2] netfilter: nft_compat: put back match/target module if init fail

2016-07-23 Thread Pablo Neira Ayuso
On Sat, Jul 23, 2016 at 04:00:31PM +0800, Liping Zhang wrote: > From: Liping Zhang > > 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 i

[PATCH nf-next 1/2] netfilter: nft_compat: put back match/target module if init fail

2016-07-23 Thread Liping Zhang
From: Liping Zhang 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 --- net/netfilter/nft_compat.c | 34 ++