summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-05-01 00:34:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-05-05 16:39:48 +0200
commit4b4ceb9dbf6a549682edff9fc5f04c204da50ab9 (patch)
tree0a6d4c5efe84ed884a377560d46b0da061eb6135 /net
parent3e86638e9a0be8bcf7db007909d8307b8b9f8e3b (diff)
downloadop-kernel-dev-4b4ceb9dbf6a549682edff9fc5f04c204da50ab9.zip
op-kernel-dev-4b4ceb9dbf6a549682edff9fc5f04c204da50ab9.tar.gz
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 <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index e3787cf..f72ede1 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();
OpenPOWER on IntegriCloud