Skip to content

Commit 4b4ceb9

Browse files
committed
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>
1 parent 3e86638 commit 4b4ceb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_conntrack_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ destroy_conntrack(struct nf_conntrack *nfct)
363363
}
364364
rcu_read_lock();
365365
l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct));
366-
if (l4proto && l4proto->destroy)
366+
if (l4proto->destroy)
367367
l4proto->destroy(ct);
368368

369369
rcu_read_unlock();

0 commit comments

Comments
 (0)