提交 6ecaa9fc 编写于 作者: N Navid Emamdoost 提交者: Xie XiuQi

ath10k: fix memory leak

mainline inclusion
from mainline-v5.4
commit b8d17e7d93d2beb89e4f34c59996376b8b544792
category: bugfix
bugzilla: 13690
CVE: CVE-2019-19078

-------------------------------------------------

In ath10k_usb_hif_tx_sg the allocated urb should be released if
usb_submit_urb fails.
Signed-off-by: NNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 61f931d3
...@@ -454,6 +454,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id, ...@@ -454,6 +454,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
ath10k_dbg(ar, ATH10K_DBG_USB_BULK, ath10k_dbg(ar, ATH10K_DBG_USB_BULK,
"usb bulk transmit failed: %d\n", ret); "usb bulk transmit failed: %d\n", ret);
usb_unanchor_urb(urb); usb_unanchor_urb(urb);
usb_free_urb(urb);
ret = -EINVAL; ret = -EINVAL;
goto err_free_urb_to_pipe; goto err_free_urb_to_pipe;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册