summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-05-13 12:39:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-22 09:31:06 +0200
commit65f1c3e4e9062c5748e86202196e40d227c60b9a (patch)
treeda2399b4a24e26e8f67e3294532dfc455a4d306c /drivers/net/wireless/marvell
parent916f41e40643ac24271cb7fddd7ec502ff95aca3 (diff)
rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()
[ Upstream commit beb12813bc75d4a23de43b85ad1c7cb28d27631e ] Seven years ago we tried to fix a leak but actually introduced a double free instead. It was an understandable mistake because the code was a bit confusing and the free was done in the wrong place. The "skb" pointer is freed in both _rtl_usb_tx_urb_setup() and _rtl_usb_transmit(). The free belongs _rtl_usb_transmit() instead of _rtl_usb_tx_urb_setup() and I've cleaned the code up a bit to hopefully make it more clear. Fixes: 36ef0b473fbf ("rtlwifi: usb: add missing freeing of skbuff") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200513093951.GD347693@mwanda Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
0 files changed, 0 insertions, 0 deletions