* [PATCH][V2] ath10k: fix memory leak on caldata on error exit path
@ 2016-09-03 16:38 Colin King
2016-09-13 12:24 ` [V2] " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-09-03 16:38 UTC (permalink / raw)
To: Kalle Valo, ath10k, linux-wireless, netdev; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
caldata is not being free'd on the error exit path, causing
a memory leak and data definitely should not be freed. Free
caldata instead of data.
Thanks to Kalle Valo for spotting that data should not be
free'd.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 9a22c47..afdf0fa 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2725,7 +2725,7 @@ static int ath10k_pci_hif_fetch_cal_eeprom(struct ath10k *ar, void **data,
return 0;
err_free:
- kfree(data);
+ kfree(caldata);
return -EINVAL;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-13 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03 16:38 [PATCH][V2] ath10k: fix memory leak on caldata on error exit path Colin King
2016-09-13 12:24 ` [V2] " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).