From 21e6938191fbc2a8aed1e48b518982262f548540 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Fri, 23 Jun 2017 16:39:17 +0800 Subject: [PATCH] qcacmn: Free events logs list of wmi handle Free events logs list of wmi handle, avoid memory leak. Change-Id: I7660239f3808ebf0f56baf5900c1290218507406 CRs-Fixed: 2062407 --- wmi_unified.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wmi_unified.c b/wmi_unified.c index b3069b1e82..910a3aae71 100644 --- a/wmi_unified.c +++ b/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]); }