This series fixes several error handling issues and memory leaks in the
rtl8723bs staging driver, found through code review and static analysis.
The patches address the following issues:
1. Firmware memory leak: In rtl8723b_FirmwareDownload(), after
successfully calling request_firmware(), if subsequent checks fail,
the firmware is not released before jumping to the error path.
2. Buffer memory leak: In rtw_cfg80211_inform_bss(), when
cfg80211_inform_bss_frame() fails, the allocated buffer is not freed.
3. Missing IS_ERR check: kthread_run() returns an ERR_PTR on failure,
not NULL. The code in rtl8723b_start_thread() was not checking for
this, which could cause issues when rtl8723b_stop_thread() later
checks if the thread pointer is non-NULL.
4. Ignored return value: rtw_wdev_alloc() can fail, but its return
value was being ignored in rtw_sdio_if1_init(), potentially leaving
the adapter in an inconsistent state.
Samasth Norway Ananda (4):
staging: rtl8723bs: fix firmware memory leak on error path
staging: rtl8723bs: fix memory leak in rtw_cfg80211_inform_bss()
staging: rtl8723bs: add IS_ERR() check for kthread_run()
staging: rtl8723bs: check return value of rtw_wdev_alloc()
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ++++++++++--
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +++-
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 ++-
3 files changed, 15 insertions(+), 4 deletions(-)
--
2.50.1