Sfoglia il codice sorgente

qcacld-3.0: Fix potential memory leaks in SSR

qcacld-2.0 to qcacld-3.0 propagation

During SSR, since VDEV detach won't happen, some contexts saved in VDEV
may not get a chance to be freed. Add change to check these contexts
in SSR shutdown routine to make sure they are freed.

Change-Id: I36d12b3bb524ca107ece2441c1dc1d80293cb31b
CRs-fixed: 957587
Yue Ma 9 anni fa
parent
commit
24cc9e05c8
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 11 0
      core/wma/src/wma_main.c

+ 11 - 0
core/wma/src/wma_main.c

@@ -2951,6 +2951,17 @@ CDF_STATUS wma_wmi_service_close(void *cds_ctx)
 			cdf_mem_free(wma_handle->interfaces[i].handle);
 			wma_handle->interfaces[i].handle = NULL;
 		}
+
+		if (wma_handle->interfaces[i].addBssStaContext) {
+			cdf_mem_free(wma_handle->
+				     interfaces[i].addBssStaContext);
+			wma_handle->interfaces[i].addBssStaContext = NULL;
+		}
+
+		if (wma_handle->interfaces[i].del_staself_req) {
+			cdf_mem_free(wma_handle->interfaces[i].del_staself_req);
+			wma_handle->interfaces[i].del_staself_req = NULL;
+		}
 	}
 
 	cdf_mem_free(wma_handle->interfaces);