Forráskód Böngészése

qcacld-3.0: Free the beacon memory when sap restart fails

Whenever there is a subsystem restart the sap is internally restarted
in the driver, whenever there is a failure during this sap restart
there could be a memory leak.

Fix is to free the beacon memory whenever the sap restart fails.

Change-Id: If329aacceef50124956bddc049ee8e55e880177d
CRs-Fixed: 2671251
Arun Kumar Khandavalli 5 éve
szülő
commit
32de55112c
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      core/hdd/src/wlan_hdd_main.c

+ 5 - 1
core/hdd/src/wlan_hdd_main.c

@@ -14450,7 +14450,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