staging: r8188eu: fix a memory leak in rtw_wx_read32()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Nov 2021 11:49:36 +0000 (14:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Nov 2021 09:23:33 +0000 (10:23 +0100)
commitbe4ea8f383551b9dae11b8dfff1f38b3b5436e9a
tree797f5ad5375fc3fc7863fb378203a755940a2c7c
parent4a293eaf92a510ff688dc7b3f0815221f99c9d1b
staging: r8188eu: fix a memory leak in rtw_wx_read32()

Free "ptmp" before returning -EINVAL.

Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211109114935.GC16587@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/ioctl_linux.c