Skip to content

Commit

Permalink
netfilter: conntrack: __nf_ct_l4proto_find() always returns valid poi…
Browse files Browse the repository at this point in the history
…nter

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>
  • Loading branch information
Pablo Neira Ayuso committed May 5, 2016
1 parent 3e86638 commit 4b4ceb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4b4ceb9

Please sign in to comment.