mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Free the ies in case during the stop adapter
Reset the sap configuration ie while stopping the adapter in the sap mode to avoid memory leak. Change-Id: I5b47afe561430fcb3f508820bc74c28b56d28b3c CRs-Fixed: 2123524
This commit is contained in:
parent
942002f86a
commit
96c122ff77
2 changed files with 20 additions and 9 deletions
|
|
@ -4358,6 +4358,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *ada
|
|||
union iwreq_data wrqu;
|
||||
tSirUpdateIE updateIE;
|
||||
unsigned long rc;
|
||||
tsap_Config_t *sap_config;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -4462,6 +4463,10 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *ada
|
|||
|
||||
case QDF_SAP_MODE:
|
||||
/* Flush IPA exception path packets */
|
||||
sap_config = &adapter->session.ap.sap_config;
|
||||
if (sap_config)
|
||||
wlansap_reset_sap_config_add_ie(sap_config,
|
||||
eUPDATE_IE_ALL);
|
||||
hdd_ipa_flush(hdd_ctx);
|
||||
|
||||
case QDF_P2P_GO_MODE:
|
||||
|
|
|
|||
|
|
@ -2209,23 +2209,29 @@ wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig, eUpdateIEsType updateTyp
|
|||
switch (updateType) {
|
||||
case eUPDATE_IE_ALL: /*only used to reset */
|
||||
case eUPDATE_IE_PROBE_RESP:
|
||||
qdf_mem_free(pConfig->pProbeRespIEsBuffer);
|
||||
pConfig->probeRespIEsBufferLen = 0;
|
||||
pConfig->pProbeRespIEsBuffer = NULL;
|
||||
if (pConfig->pProbeRespIEsBuffer) {
|
||||
qdf_mem_free(pConfig->pProbeRespIEsBuffer);
|
||||
pConfig->probeRespIEsBufferLen = 0;
|
||||
pConfig->pProbeRespIEsBuffer = NULL;
|
||||
}
|
||||
if (eUPDATE_IE_ALL != updateType)
|
||||
break;
|
||||
|
||||
case eUPDATE_IE_ASSOC_RESP:
|
||||
qdf_mem_free(pConfig->pAssocRespIEsBuffer);
|
||||
pConfig->assocRespIEsLen = 0;
|
||||
pConfig->pAssocRespIEsBuffer = NULL;
|
||||
if (pConfig->pAssocRespIEsBuffer) {
|
||||
qdf_mem_free(pConfig->pAssocRespIEsBuffer);
|
||||
pConfig->assocRespIEsLen = 0;
|
||||
pConfig->pAssocRespIEsBuffer = NULL;
|
||||
}
|
||||
if (eUPDATE_IE_ALL != updateType)
|
||||
break;
|
||||
|
||||
case eUPDATE_IE_PROBE_BCN:
|
||||
qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
|
||||
pConfig->probeRespBcnIEsLen = 0;
|
||||
pConfig->pProbeRespBcnIEsBuffer = NULL;
|
||||
if (pConfig->pProbeRespBcnIEsBuffer) {
|
||||
qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
|
||||
pConfig->probeRespBcnIEsLen = 0;
|
||||
pConfig->pProbeRespBcnIEsBuffer = NULL;
|
||||
}
|
||||
if (eUPDATE_IE_ALL != updateType)
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue