From: Ivo van Doorn Date: Sun, 20 Jul 2008 16:03:58 +0000 (+0200) Subject: rt2x00: Fix memleak when RTS/CTS fails X-Git-Tag: v2.6.27-rc2~119^2~6^2~16 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e7087a828f8714e464fff18d93618727530dfd89;p=linux-2.6-omap-h63xx.git rt2x00: Fix memleak when RTS/CTS fails When sending the RTS/CTS frame fails, we should free the skb buffer which was created. Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 9d346bd2db0..1f83d5fbf6b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -83,6 +83,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, (struct ieee80211_rts *)(skb->data)); if (rt2x00queue_write_tx_frame(queue, skb)) { + dev_kfree_skb_any(skb); WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); return NETDEV_TX_BUSY; }