From: Pablo Neira Ayuso Date: Sat, 30 Apr 2016 22:34:37 +0000 (+0200) Subject: netfilter: conntrack: __nf_ct_l4proto_find() always returns valid pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b4ceb9dbf6a549682edff9fc5f04c204da50ab9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git netfilter: conntrack: __nf_ct_l4proto_find() always returns valid pointer Remove unnecessary check for non-nul pointer in destroy_conntrack() given that __nf_ct_l4proto_find() returns the generic protocol tracker if the protocol is not supported. Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index e3787cf33427..f72ede19354c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -363,7 +363,7 @@ destroy_conntrack(struct nf_conntrack *nfct) } rcu_read_lock(); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); - if (l4proto && l4proto->destroy) + if (l4proto->destroy) l4proto->destroy(ct); rcu_read_unlock();