rt2x00: Fix memleak in tx() path
authorIvo van Doorn <ivdoorn@gmail.com>
Fri, 23 May 2008 16:13:41 +0000 (18:13 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 28 May 2008 20:43:43 +0000 (16:43 -0400)
When the tx() handler runs while the device has disapeared,
we did return NETDEV_TX_OK but didn't free the skb.

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 c206b509207051331f4791373521c773f0fda5cd..87e280a21971faf5dbb8e5f15186ec8d41c21ec2 100644 (file)
@@ -93,6 +93,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
         */
        if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) {
                ieee80211_stop_queues(hw);
+               dev_kfree_skb_any(skb);
                return NETDEV_TX_OK;
        }