Skip to content

Commit

Permalink
llc: free the right skb
Browse files Browse the repository at this point in the history
We are freeing skb instead of nskb, resulting in a double
free on skb and a leak from nskb.

Signed-off-by: Sorin Dumitru <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sorin Dumitru authored and davem330 committed Aug 6, 2012
1 parent 8b82f7c commit 91d27a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/llc/llc_station.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
out:
return rc;
free:
kfree_skb(skb);
kfree_skb(nskb);
goto out;
}

Expand All @@ -293,7 +293,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
out:
return rc;
free:
kfree_skb(skb);
kfree_skb(nskb);
goto out;
}

Expand Down Expand Up @@ -322,7 +322,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
out:
return rc;
free:
kfree_skb(skb);
kfree_skb(nskb);
goto out;
}

Expand Down

0 comments on commit 91d27a8

Please sign in to comment.