rt2x00: Fix memleak in tx() path

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>
This commit is contained in:
Ivo van Doorn 2008-05-23 18:13:41 +02:00 committed by John W. Linville
parent 9381be059b
commit 0f3e63a55b
1 changed files with 1 additions and 0 deletions

View 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;
}