rsi: fix memory leak on failed URB submission
authorJohan Hovold <johan@kernel.org>
Thu, 28 Nov 2019 17:22:02 +0000 (18:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:34:51 +0000 (09:34 +0000)
commit1f04209d19c505be7e4fd6b39c8b776819e80555
tree45bd1826fcdf1dcc9143cbd3bbbc4a404236216c
parent2d367468ecdf3fb58e58bfb534cc8c97d1b2eae5
rsi: fix memory leak on failed URB submission

commit 47768297481184932844ab01a86752ba31a38861 upstream.

Make sure to free the skb on failed receive-URB submission (e.g. on
disconnect or currently also due to a missing endpoint).

Fixes: a1854fae1414 ("rsi: improve RX packet handling in USB interface")
Cc: stable <stable@vger.kernel.org> # 4.17
Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rsi/rsi_91x_usb.c