Skip to content
Commit f21f9083 authored by Xiaohui Zhang's avatar Xiaohui Zhang Committed by Greg Kroah-Hartman
Browse files

nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred

[ Upstream commit 8a4d4807 ]

Similar to the handling of play_deferred in commit 19cfe912


("Bluetooth: btusb: Fix memory leak in play_deferred"), we thought
a patch might be needed here as well.

Currently usb_submit_urb is called directly to submit deferred tx
urbs after unanchor them.

So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb
and cause memory leak.

Put those urbs in tx_anchor to avoid the leak, and also fix the error
handling.

Signed-off-by: default avatarXiaohui Zhang <xiaohuizhang@ruc.edu.cn>
Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220607083230.6182-1-xiaohuizhang@ruc.edu.cn
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent eef6d16c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment