staging: r8188eu: fix memory leak in rtw_set_key
authorPavel Skripkin <paskripkin@gmail.com>
Fri, 3 Sep 2021 18:17:52 +0000 (21:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:45 +0000 (19:16 +0100)
commit03060aec7281d5dd5e1460e322771c5b011d4117
tree39c59aba03e7358fd78fbabdef6dc337d6a283fe
parent8853e04ea61d4296b09347f361e3b3fd8f859b7f
staging: r8188eu: fix memory leak in rtw_set_key

[ Upstream commit 393db0f6827f96054a769ba3a38aa382d137d3c7 ]

Before returning with an error we should free allocated buffers, since
they are not assigned to anywhere.

Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/ee783fbb71abb549505b84542223be7a7c905eea.1630692375.git.paskripkin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/r8188eu/core/rtw_mlme.c