aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-09-03 12:38:19 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2016-09-13 08:24:20 -0400
commit5f4761dda2ba3743ceb5eb5b5e7483172927831a (patch)
tree4853a011b973b0676654819ecc244cf46724bad3 /drivers/net/wireless/ath/ath10k
parent3cd32dde17ea938651b434fc35dee8370f555378 (diff)
ath10k: fix memory leak on caldata on error exit path
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> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k')
-rw-r--r--drivers/net/wireless/ath/ath10k/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 0635995ba165..a6d9c06ed045 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2726,7 +2726,7 @@ static int ath10k_pci_hif_fetch_cal_eeprom(struct ath10k *ar, void **data,
2726 return 0; 2726 return 0;
2727 2727
2728err_free: 2728err_free:
2729 kfree(data); 2729 kfree(caldata);
2730 2730
2731 return -EINVAL; 2731 return -EINVAL;
2732} 2732}