netfilter: nft_log: fix possible memory leak if log expr init fail
authorLiping Zhang <liping.zhang@spreadtrum.com>
Mon, 18 Jul 2016 12:44:15 +0000 (20:44 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 21 Jul 2016 00:32:32 +0000 (02:32 +0200)
commitc2d9a4293ced88d7dad7c35c893a31f49f8b64f5
tree991574c5890d8043667b50ff3d4389feee526142
parent82de0be6862cdca2e6802267bda57cfc8844d3a7
netfilter: nft_log: fix possible memory leak if log expr init fail

Suppose that we specify the NFTA_LOG_PREFIX, then NFTA_LOG_LEVEL
and NFTA_LOG_GROUP are specified together or nf_logger_find_get
call returns fail, i.e. expr init fail, memory leak will happen.

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