* [PATCH -next] ath10k: fix possible memory leak in ath10k_pci_probe()
@ 2013-10-30 5:24 Wei Yongjun
2013-11-06 8:50 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-10-30 5:24 UTC (permalink / raw)
To: kvalo, linville; +Cc: yongjun_wei, ath10k, linux-wireless
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
memory is malloced in ath10k_pci_probe() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
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 dff23d9..af01631 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2470,7 +2470,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
ret = ath10k_do_pci_wake(ar);
if (ret) {
ath10k_err("Failed to get chip id: %d\n", ret);
- return ret;
+ goto err_iomap;
}
chip_id = ath10k_pci_read32(ar,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ath10k: fix possible memory leak in ath10k_pci_probe()
2013-10-30 5:24 [PATCH -next] ath10k: fix possible memory leak in ath10k_pci_probe() Wei Yongjun
@ 2013-11-06 8:50 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-11-06 8:50 UTC (permalink / raw)
To: Wei Yongjun; +Cc: linville, yongjun_wei, linux-wireless, ath10k
Wei Yongjun <weiyj.lk@gmail.com> writes:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> memory is malloced in ath10k_pci_probe() and should be freed before
> leaving from the error handling cases, otherwise it will cause
> memory leak.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Thanks, applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-06 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30 5:24 [PATCH -next] ath10k: fix possible memory leak in ath10k_pci_probe() Wei Yongjun
2013-11-06 8:50 ` 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).