Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 02/11] ath9k: Fix memleak on TX DMA failure
@ 2009-04-13 16:26 Sujith
  0 siblings, 0 replies; only message in thread
From: Sujith @ 2009-04-13 16:26 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

The driver-specific region has to be freed in case
of a DMA mapping failure.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 628b780..faf2cab 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1572,8 +1572,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;
 	}
 
-- 
1.6.2.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-13 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-13 16:26 [PATCH 02/11] ath9k: Fix memleak on TX DMA failure Sujith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox