qcacld-3.0: Fix mem leak in SAP SSR

Fix a memory leak observed if SAP restart fails after SSR.

Change-Id: I868b20972e4b78b6f6c89a26fc41ad10161c239c
CRs-fixed: 2060614
Este commit está contenido en:
Manikandan Mohan
2017-06-14 10:50:18 -07:00
cometido por snandini
padre ab482ac2b4
commit 3dad1a4869
Se han modificado 2 ficheros con 14 adiciones y 5 borrados

Ver fichero

@@ -906,14 +906,16 @@ QDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
"%s: Invalid MAC context from p_cds_gctx",
__func__);
return QDF_STATUS_E_FAULT;
qdf_status = QDF_STATUS_E_FAULT;
goto fail;
}
pmac = PMAC_STRUCT(hHal);
if (NULL == pmac) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
"%s: Invalid MAC context from p_cds_gctx",
__func__);
return QDF_STATUS_E_FAULT;
qdf_status = QDF_STATUS_E_FAULT;
goto fail;
}
/* If concurrent session is running that is already associated
* then we just follow that sessions country info (whether
@@ -960,6 +962,9 @@ QDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */
/* Handle event */
qdf_status = sap_fsm(pSapCtx, &sapEvent);
fail:
if (QDF_IS_STATUS_ERROR(qdf_status))
sap_free_roam_profile(&pSapCtx->csr_roamProfile);
return qdf_status;
} /* wlansap_start_bss */