]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
rt2x00: Fix memleak when RTS/CTS fails
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 20 Jul 2008 16:03:58 +0000 (18:03 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 Jul 2008 20:55:05 +0000 (16:55 -0400)
When sending the RTS/CTS frame fails, we should
free the skb buffer which was created.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00mac.c

index 9d346bd2db0efbec08a3daac7728a3e18c6aba24..1f83d5fbf6b018494a1cca0a087b6002f684ea00 100644 (file)
@@ -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;
        }