[ovs-dev] [patch] datapath: Unconditionally call kfree_skb()

Simon Horman horms at verge.net.au
Wed Aug 25 03:10:32 UTC 2010


kfree_skb() will ignore a NULL pointer.

Signed-off-by: Simon Horman <horms at verge.net.au>

Index: openvswitch/datapath/brcompat.c
===================================================================
--- openvswitch.orig/datapath/brcompat.c	2010-08-25 12:02:18.000000000 +0900
+++ openvswitch/datapath/brcompat.c	2010-08-25 12:02:42.000000000 +0900
@@ -425,8 +425,7 @@ static int brc_genl_dp_result(struct sk_
 	if (brc_seq == info->snd_seq) {
 		brc_seq++;
 
-		if (brc_reply)
-			kfree_skb(brc_reply);
+		kfree_skb(brc_reply);
 		brc_reply = skb;
 
 		complete(&brc_done);




More information about the dev mailing list