From: Liping Zhang Date: Wed, 15 Mar 2017 14:22:08 +0000 (+0800) Subject: netfilter: nft_ct: do cleanup work when NFTA_CT_DIRECTION is invalid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4494dbc6dec37817f2cc2aa7604039a9e87ada18;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git netfilter: nft_ct: do cleanup work when NFTA_CT_DIRECTION is invalid We should jump to invoke __nft_ct_set_destroy() instead of just return error. Fixes: edee4f1e9245 ("netfilter: nft_ct: add zone id set support") Signed-off-by: Liping Zhang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index 91585b5e5307..0264258c46fe 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c @@ -544,7 +544,8 @@ static int nft_ct_set_init(const struct nft_ctx *ctx, case IP_CT_DIR_REPLY: break; default: - return -EINVAL; + err = -EINVAL; + goto err1; } }