netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: fix memory leak
@ 2019-09-20  1:36 Navid Emamdoost
  2019-09-23  8:30 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Navid Emamdoost @ 2019-09-20  1:36 UTC (permalink / raw)
  Cc: emamd001, smccaman, kjlu, Navid Emamdoost, Kalle Valo,
	David S. Miller, ath10k, linux-wireless, netdev, linux-kernel

In ath10k_usb_hif_tx_sg the allocated urb should be released if
usb_submit_urb fails.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
 drivers/net/wireless/ath/ath10k/usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index e1420f67f776..730ed22e08a0 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -435,6 +435,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
 			ath10k_dbg(ar, ATH10K_DBG_USB_BULK,
 				   "usb bulk transmit failed: %d\n", ret);
 			usb_unanchor_urb(urb);
+			usb_free_urb(urb);
 			ret = -EINVAL;
 			goto err_free_urb_to_pipe;
 		}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath10k: fix memory leak
  2019-09-20  1:36 [PATCH] ath10k: fix memory leak Navid Emamdoost
@ 2019-09-23  8:30 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-09-23  8:30 UTC (permalink / raw)
  To: Navid Emamdoost

Navid Emamdoost <navid.emamdoost@gmail.com> wrote:

> In ath10k_usb_hif_tx_sg the allocated urb should be released if
> usb_submit_urb fails.
> 
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

b8d17e7d93d2 ath10k: fix memory leak

-- 
https://patchwork.kernel.org/patch/11153699/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-23  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20  1:36 [PATCH] ath10k: fix memory leak Navid Emamdoost
2019-09-23  8:30 ` 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).