Fix memory leak 85/290185/1
authorXuelian Bai <xuelian.bai@samsung.com>
Tue, 21 Mar 2023 06:56:27 +0000 (14:56 +0800)
committerXuelian Bai <xuelian.bai@samsung.com>
Tue, 21 Mar 2023 06:56:27 +0000 (14:56 +0800)
Wait until tbm_queue is destroyed, on pixel phone swapchain is destroyed
before tbm_queue is destroyed, then tbm_queue is never destroyed, then
cause memory leak

Change-Id: I897be13684f0e1f901aad751111c1e469414e178

src/tpl_wl_vk_thread.c

index fe0d337..341360f 100644 (file)
@@ -1817,7 +1817,7 @@ __tpl_wl_vk_surface_destroy_swapchain(tpl_surface_t *surface)
        wl_vk_surface->sent_message = DESTROY_QUEUE;
        tpl_gsource_send_message(wl_vk_surface->surf_source,
                                                         wl_vk_surface->sent_message);
-       while (!swapchain->tbm_queue)
+       while (swapchain->tbm_queue)
                tpl_gcond_wait(&wl_vk_surface->surf_cond, &wl_vk_surface->surf_mutex);
        tpl_gmutex_unlock(&wl_vk_surface->surf_mutex);