aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-04-13 21:56:34 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-02 16:50:13 -0700
commit88b8ab38b1b8d606fdc3b30b08ae9d9006c65961 (patch)
treeea178ad1c8b8da43eee9c78cdefbc7774591c293 /drivers
parent6dd473f8f9d29686f593b1a2151da74138488ae8 (diff)
ath9k: Fix memleak on TX DMA failure
commit 675902ef822c114c0dac17ed10eed43eb8f5c9ec upstream. The driver-specific region has to be freed in case of a DMA mapping failure. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 689bdbf7880..c92f44288f4 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -1573,8 +1573,9 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
skb->len, DMA_TO_DEVICE);
if (unlikely(dma_mapping_error(sc->dev, bf->bf_dmacontext))) {
bf->bf_mpdu = NULL;
- DPRINTF(sc, ATH_DBG_CONFIG,
- "dma_mapping_error() on TX\n");
+ kfree(tx_info_priv);
+ tx_info->rate_driver_data[0] = NULL;
+ DPRINTF(sc, ATH_DBG_FATAL, "dma_mapping_error() on TX\n");
return -ENOMEM;
}