diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6b4570454372..86f12543c9d5 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -14230,7 +14230,11 @@ end: * in hdd_stop_adapter */ hdd_err("SAP restart after SSR failed! Reload WLAN and try SAP again"); - + /* Free the beacon memory in case of failure in the sap restart */ + if (ap_adapter->session.ap.beacon) { + qdf_mem_free(ap_adapter->session.ap.beacon); + ap_adapter->session.ap.beacon = NULL; + } } #ifdef QCA_CONFIG_SMP