Skip to content

Commit

Permalink
ath10k: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Navidem authored and Kalle Valo committed Sep 23, 2019
1 parent 35cc054 commit b8d17e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath10k/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b8d17e7

Please sign in to comment.