rtlwifi: rtl8192ee: Fix memory leak when loading firmware
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 14 Sep 2017 18:17:44 +0000 (13:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:46 +0000 (08:40 +0000)
commit9f724960c581097e6a84a2f4b9c77a9f17a372cc
treebcacfbcbd7868efdae7c6af0ce7afece0c11ab3e
parent584f0bb5681a1ed7e05b30aabab2764d55cbc3cb
rtlwifi: rtl8192ee: Fix memory leak when loading firmware

commit 519ce2f933fa14acf69d5c8cabcc18711943d629 upstream.

In routine rtl92ee_set_fw_rsvdpagepkt(), the driver allocates an skb, but
never calls rtl_cmd_send_packet(), which will free the buffer. All other
rtlwifi drivers perform this operation correctly.

This problem has been in the driver since it was included in the kernel.
Fortunately, each firmware load only leaks 4 buffers, which likely
explains why it has not previously been detected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c