Skip to content

Commit

Permalink
packet: remove some pointless conditionals before kfree_skb()
Browse files Browse the repository at this point in the history
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Feb 27, 2009
1 parent ce030ed commit acb5d75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
spin_unlock(&sk->sk_receive_queue.lock);

sk->sk_data_ready(sk, 0);
if (copy_skb)
kfree_skb(copy_skb);
kfree_skb(copy_skb);
goto drop_n_restore;
}

Expand Down

0 comments on commit acb5d75

Please sign in to comment.