Commit 1d08962f authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

ipv4: remove redundant null pointer check before kfree_skb

kfree_skb has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree_skb.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 16a3f50f
...@@ -260,8 +260,7 @@ static void ip_expire(struct timer_list *t) ...@@ -260,8 +260,7 @@ static void ip_expire(struct timer_list *t)
spin_unlock(&qp->q.lock); spin_unlock(&qp->q.lock);
out_rcu_unlock: out_rcu_unlock:
rcu_read_unlock(); rcu_read_unlock();
if (head) kfree_skb(head);
kfree_skb(head);
ipq_put(qp); ipq_put(qp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment