diff mbox

llc: free the right skb

Message ID 1344256558-22649-1-git-send-email-sdumitru@ixiacom.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Sorin Dumitru Aug. 6, 2012, 12:35 p.m. UTC
We are freeing skb instead of nskb, resulting in a double
free on skb and a leak from nskb.

Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>
---
 net/llc/llc_station.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

David Miller Aug. 6, 2012, 8:31 p.m. UTC | #1
From: Sorin Dumitru <sdumitru@ixiacom.com>
Date: Mon, 6 Aug 2012 15:35:58 +0300

> We are freeing skb instead of nskb, resulting in a double
> free on skb and a leak from nskb.
> 
> Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index 39a8d89..6828e39 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -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;
 }
 
@@ -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;
 }
 
@@ -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;
 }