瀏覽代碼

qcacld-3.0: Fix memory leak in start ext scan

In wma_start_extscan scan req params is allocated but not freed
once command is sent to WMI.

Fix it by freeing the scan req params once sent to WMI.

Change-Id: I3eb37b33c3731e69991b9d67aa9274abeebb5339
CRs-Fixed: 2029379
Abhishek Singh 8 年之前
父節點
當前提交
b61b5453a3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      core/wma/src/wma_scan_roam.c

+ 2 - 1
core/wma/src/wma_scan_roam.c

@@ -4803,7 +4803,7 @@ QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
 QDF_STATUS wma_start_extscan(tp_wma_handle wma,
 			     tSirWifiScanCmdReqParams *pstart)
 {
-	struct wifi_scan_cmd_req_params *params = {0};
+	struct wifi_scan_cmd_req_params *params;
 	int i, j;
 	QDF_STATUS status;
 
@@ -4871,6 +4871,7 @@ QDF_STATUS wma_start_extscan(tp_wma_handle wma,
 
 	status = wmi_unified_start_extscan_cmd(wma->wmi_handle,
 					params);
+	qdf_mem_free(params);
 	if (QDF_IS_STATUS_ERROR(status))
 		return status;