datapath: Unconditionally call kfree_skb()
authorSimon Horman <horms@verge.net.au>
Wed, 25 Aug 2010 03:10:32 +0000 (12:10 +0900)
committerJesse Gross <jesse@nicira.com>
Wed, 25 Aug 2010 03:18:17 +0000 (20:18 -0700)
kfree_skb() will ignore a NULL pointer.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/brcompat.c

index b68720bd811f3e031aab7237faeb83cd59bcc06b..44b2c9923e4f8dd1a313a07060abd1ed4f5bc751 100644 (file)
@@ -425,8 +425,7 @@ static int brc_genl_dp_result(struct sk_buff *skb, struct genl_info *info)
        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);