staging: rtl8723bs: Fix a resource leak in sd_int_dpc
PATCH 1/1 staging: rtl8723bs: Fix a resource leak in sd_int_dpc
The "c2h_evt" variable is not freed when function call "c2h_evt_read_88xx" failed
Fixes 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by Xiangyang Zhang <[email protected]>
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/rtl8723bs/hal/sdio_ops.c +2 -0
@@ -909,6 +909,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 */
Signature · 1 line
2.19.1
Hi,
Quoted 5 lines · Xiangyang Zhang
The "
c2h_evt" variable is not freed when function call "c2h_evt_read_88xx" failedFixes 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")Signed-off-by Xiangyang Zhang <[email protected]>
Thanks, patch looks good to me:
Reviewed-by Hans de Goede <[email protected]>
Regards,
Hans
Quoted 18 lines
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/rtl8723bs/hal/sdio_ops.c +2
-0@@ -909,6 +909,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 */