Skip to content

Commit

Permalink
openvswitch: checking wrong variable in queue_userspace_packet()
Browse files Browse the repository at this point in the history
"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 <[email protected]>
Acked-by: Jesse Gross <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed May 13, 2012
1 parent b99215c commit 8aa51d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
return -ENOMEM;

nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
if (!skb)
if (!nskb)
return -ENOMEM;

nskb->vlan_tci = 0;
Expand Down

0 comments on commit 8aa51d6

Please sign in to comment.