mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-02 16:23:55 +00:00
netfilter: nf_tables: typo NULL check in _clone() function
commit 51edb2ff1c6fc27d3fa73f0773a31597ecd8e230 upstream. This should check for NULL in case memory allocation fails. Reported-by: Julian Wiedmann <jwiedmann.dev@gmail.com> Fixes: 3b9e2ea6c11b ("netfilter: nft_limit: move stateful fields out of expression data") Fixes: 37f319f37d90 ("netfilter: nft_connlimit: move stateful fields out of expression data") Fixes: 33a24de37e81 ("netfilter: nft_last: move stateful fields out of expression data") Fixes: ed0a0c60f0e5 ("netfilter: nft_quota: move stateful fields out of expression data") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Link: https://lore.kernel.org/r/20220110194817.53481-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> [ Portion of this patch applied - gregkh ] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
committed by
Ulrich Hecht
parent
32e3b26138
commit
7ccdebe481
@ -209,7 +209,7 @@ static int nft_connlimit_clone(struct nft_expr *dst, const struct nft_expr *src)
|
||||
struct nft_connlimit *priv_src = nft_expr_priv(src);
|
||||
|
||||
priv_dst->list = kmalloc(sizeof(*priv_dst->list), GFP_ATOMIC);
|
||||
if (priv_dst->list)
|
||||
if (!priv_dst->list)
|
||||
return -ENOMEM;
|
||||
|
||||
nf_conncount_list_init(priv_dst->list);
|
||||
|
||||
Reference in New Issue
Block a user