2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 08:38:24 +08:00

openvswitch: checking wrong variable in queue_userspace_packet()

"skb" is non-NULL here, for example we dereference it in skb_clone().
The intent was to test "nskb" which was just set.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2012-05-13 08:44:18 +00:00 committed by David S. Miller
parent b99215cdc6
commit 8aa51d64c1

View File

@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
return -ENOMEM; return -ENOMEM;
nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb)); nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
if (!skb) if (!nskb)
return -ENOMEM; return -ENOMEM;
nskb->vlan_tci = 0; nskb->vlan_tci = 0;