瀏覽代碼

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: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
zhong jiang 7 年之前
父節點
當前提交
1d08962ff1
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      net/ipv4/ip_fragment.c

+ 1 - 2
net/ipv4/ip_fragment.c

@@ -260,8 +260,7 @@ out:
 	spin_unlock(&qp->q.lock);
 out_rcu_unlock:
 	rcu_read_unlock();
-	if (head)
-		kfree_skb(head);
+	kfree_skb(head);
 	ipq_put(qp);
 }