mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Fix psoc ref count leak in wma_open
In wma_open, first get ref of psoc, then attach wmi, if attach failed, should release ref of psoc before return Change-Id: If2e21bbf8b54de865c2b54582685974474ea3c7c CRs-Fixed: 2250872
This commit is contained in:
parent
e29000582d
commit
f9e2e2d18f
1 changed files with 3 additions and 1 deletions
|
|
@ -3114,7 +3114,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
|||
qdf_status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_LEGACY_WMA_ID);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
WMA_LOGE("%s: PSOC get_ref fails", __func__);
|
||||
goto err_wma_handle;
|
||||
goto err_get_psoc_ref;
|
||||
}
|
||||
wma_handle->psoc = psoc;
|
||||
|
||||
|
|
@ -3585,6 +3585,8 @@ err_scn_context:
|
|||
|
||||
err_wma_handle:
|
||||
target_if_close();
|
||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_LEGACY_WMA_ID);
|
||||
err_get_psoc_ref:
|
||||
target_if_free_psoc_tgt_info(psoc);
|
||||
if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) {
|
||||
#ifdef FEATURE_WLAN_EXTSCAN
|
||||
|
|
|
|||
Loading…
Reference in a new issue