Skip to content

Commit 990e4ad

Browse files
shellbombsgregkh
authored andcommitted
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: 554c0a3 ("staging: Add rtl8723bs sdio wifi driver") Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Xiangyang Zhang <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2734d6c commit 990e4ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/staging/rtl8723bs/hal/sdio_ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,8 @@ void sd_int_dpc(struct adapter *adapter)
909909
} else {
910910
rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
911911
}
912+
} else {
913+
kfree(c2h_evt);
912914
}
913915
} else {
914916
/* Error handling for malloc fail */

0 commit comments

Comments
 (0)