瀏覽代碼

qcacmn: Free events logs list of wmi handle

Free events logs list of wmi handle, avoid memory leak.

Change-Id: I7660239f3808ebf0f56baf5900c1290218507406
CRs-Fixed: 2062407
Wu Gao 7 年之前
父節點
當前提交
a5e5c6410a
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      wmi/src/wmi_unified.c

+ 6 - 0
wmi/src/wmi_unified.c

@@ -2777,6 +2777,12 @@ void wmi_unified_detach(struct wmi_unified *wmi_handle)
 			}
 
 			wmi_log_buffer_free(soc->wmi_pdev[i]);
+
+			/* Free events logs list */
+			if (soc->wmi_pdev[i]->events_logs_list)
+				qdf_mem_free(
+					soc->wmi_pdev[i]->events_logs_list);
+
 			qdf_spinlock_destroy(&soc->wmi_pdev[i]->eventq_lock);
 			qdf_mem_free(soc->wmi_pdev[i]);
 		}