提交 4b4ceb9d 编写于 作者: P Pablo Neira Ayuso

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: NPablo Neira Ayuso <pablo@netfilter.org>
上级 3e86638e
...@@ -363,7 +363,7 @@ destroy_conntrack(struct nf_conntrack *nfct) ...@@ -363,7 +363,7 @@ destroy_conntrack(struct nf_conntrack *nfct)
} }
rcu_read_lock(); rcu_read_lock();
l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct));
if (l4proto && l4proto->destroy) if (l4proto->destroy)
l4proto->destroy(ct); l4proto->destroy(ct);
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册