Fix a bug where skb_clone() NULL check is missing in sample action
implementation.

Signed-off-by: Andy Zhou <az...@nicira.com>
---
 datapath/actions.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/datapath/actions.c b/datapath/actions.c
index 5cd7492..daa7b43 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -576,6 +576,8 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
                skb_get(skb);
        } else {
                sample_skb = skb_clone(skb, GFP_ATOMIC);
+               if (!sample_skb)
+                       return -ENOMEM;
        }
 
        /* Note that do_execute_actions() never consumes skb.
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to