aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-09-19 20:36:26 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-12-02 14:07:27 -0500
commit56e06c206399fabaa40dc8b7d4f0afc5d9b86870 (patch)
treec95e62432e7e2f35458b390d1e50c3863b530b5f
parent6e5539a37bebc68ec6dcd228778b6a7ce95b7461 (diff)
downloadlinux-yocto-56e06c206399fabaa40dc8b7d4f0afc5d9b86870.tar.gz
linux-yocto-56e06c206399fabaa40dc8b7d4f0afc5d9b86870.tar.bz2
linux-yocto-56e06c206399fabaa40dc8b7d4f0afc5d9b86870.zip
ath10k: fix memory leak
commit b8d17e7d93d2beb89e4f34c59996376b8b544792 upstream. 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> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index a3ecf7d77949..3080570ecdf3 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;
}