mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
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: 554c0a3abf
("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>
This commit is contained in:
parent
2734d6c1b1
commit
990e4ad3dd
1 changed files with 2 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue