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>
Mon, 13 Sep 2021 06:49:47 +0000 (08:49 +0200)
commit393db0f6827f96054a769ba3a38aa382d137d3c7
tree4bab3b5738727a0a73b8e3ad9a151e6404ba2ea4
parent3821a784051b026c86eb7dfac7c7d8416c80f695
staging: r8188eu: fix memory leak in rtw_set_key

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>
drivers/staging/r8188eu/core/rtw_mlme.c