mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacld-3.0: Reset cfg_ctx to NULL after its freed
Reset cfg_ctx to NULL after its freed to avoid any use after free. Change-Id: Iff0eb6f6db5a1467913cebd09a424776ed3390c1 CRs-Fixed: 2337050
This commit is contained in:
parent
4c66322b99
commit
fe6e62f50f
1 changed files with 2 additions and 0 deletions
|
|
@ -3678,6 +3678,7 @@ err_event_init:
|
|||
|
||||
err_scn_context:
|
||||
qdf_mem_free(((struct cds_context *) cds_context)->cfg_ctx);
|
||||
((struct cds_context *)cds_context)->cfg_ctx = NULL;
|
||||
OS_FREE(wmi_handle);
|
||||
|
||||
err_wma_handle:
|
||||
|
|
@ -4624,6 +4625,7 @@ QDF_STATUS wma_wmi_service_close(void)
|
|||
cds_free_context(QDF_MODULE_ID_WMA, wma_handle);
|
||||
|
||||
qdf_mem_free(((struct cds_context *) cds_ctx)->cfg_ctx);
|
||||
((struct cds_context *)cds_ctx)->cfg_ctx = NULL;
|
||||
WMA_LOGD("%s: Exit", __func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue