OSDN Git Service

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:37:21 +0000 (08:37 +0000)
commit3c260c60d20c51283904462015069063f78b065d
treecb807becf98334158ead807df54f9d28071c60dc
parenta8b8ab79ca4fd69182f5864ddcd59994717e0186
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