Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24cc9e05 authored by Yue Ma's avatar Yue Ma Committed by Akash Patel
Browse files

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
parent f8355141
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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);