openvswitch: Fix memory leak.
authorPravin B Shelar <pshelar@nicira.com>
Tue, 11 Nov 2014 21:40:49 +0000 (13:40 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Fri, 14 Nov 2014 23:13:26 +0000 (15:13 -0800)
Need to free memory in case of sample action error.

Introduced by commit 651887b0c22cffcfce7eb9c ("openvswitch: Sample
action without side effects").

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
net/openvswitch/actions.c

index 006886dbee36b075fc7054ec1ddc87781a75d739..00e447a17f64984faf33a8852e628aa54ad9ef20 100644 (file)
@@ -722,8 +722,6 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
 
                case OVS_ACTION_ATTR_SAMPLE:
                        err = sample(dp, skb, key, a);
-                       if (unlikely(err)) /* skb already freed. */
-                               return err;
                        break;
                }