mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Fix mem leak in hdd_wlan_start_modules
In function hdd_wlan_start_modules, when hdd_configure_cds return error, driver does not free memory buffer hdd_ctx->target_hw_name in hdd_update_hw_sw_info, which is allocated when the driver is in the open state. Fix is to free the memory for hdd_ctx->target_hw_name buffer and set to NULL. Change-Id: Ib8bee8d4df51404e848cfd4da628ebf3f7ff718d CRs-Fixed: 2159490
This commit is contained in:
parent
43e8dffc25
commit
7ae9b7bed4
1 changed files with 4 additions and 1 deletions
|
|
@ -2867,7 +2867,10 @@ power_down:
|
|||
release_lock:
|
||||
hdd_ctx->start_modules_in_progress = false;
|
||||
mutex_unlock(&hdd_ctx->iface_change_lock);
|
||||
|
||||
if (hdd_ctx->target_hw_name) {
|
||||
qdf_mem_free(hdd_ctx->target_hw_name);
|
||||
hdd_ctx->target_hw_name = NULL;
|
||||
}
|
||||
/* many adapter resources are not freed by design in SSR case */
|
||||
if (!reinit)
|
||||
hdd_check_for_leaks();
|
||||
|
|
|
|||
Loading…
Reference in a new issue