소스 검색

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]);
 		}