diff options
author | Xiangyang Zhang <xyz.sun.ok@gmail.com> | 2021-06-28 23:22:39 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-12 13:22:13 +0200 |
commit | 369101e399117a4019d3ee3c03318f820a9d7745 (patch) | |
tree | c84433513076ae82c0418edcfb5310aee899d4d7 | |
parent | 1628b64efb3638ae959cc81ff2b293eba92ee2e0 (diff) | |
download | linux-stable-369101e399117a4019d3ee3c03318f820a9d7745.tar.gz linux-stable-369101e399117a4019d3ee3c03318f820a9d7745.tar.bz2 linux-stable-369101e399117a4019d3ee3c03318f820a9d7745.zip |
staging: rtl8723bs: Fix a resource leak in sd_int_dpc
commit 990e4ad3ddcb72216caeddd6e62c5f45a21e8121 upstream.
The "c2h_evt" variable is not freed when function call
"c2h_evt_read_88xx" failed
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210628152239.5475-1-xyz.sun.ok@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 369f55d11519..31cbcdeac14a 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -989,6 +989,8 @@ void sd_int_dpc(struct adapter *adapter) } else { rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt); } + } else { + kfree(c2h_evt); } } else { /* Error handling for malloc fail */ |