From 11d988ad78c7583916e500b1a9db9a345494276b Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Tue, 23 Nov 2021 09:29:16 +0900 Subject: [PATCH] e_hwc_window: fix accessing the hwc_window after it is unreferenced Change-Id: Ic7b3c5f5455479947241a47b467a77100ac3731f --- src/bin/e_hwc_window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/e_hwc_window.c b/src/bin/e_hwc_window.c index b0311cd..b3b87ba 100644 --- a/src/bin/e_hwc_window.c +++ b/src/bin/e_hwc_window.c @@ -2791,11 +2791,11 @@ e_hwc_window_pending_update_data_dequeue_cancel(E_Hwc_Window *hwc_window, E_Hwc_ e_comp_wl_buffer_reference(&update->buffer_ref, NULL); e_hwc_window_buffer_set(&update->buffer, NULL, NULL, 0); + hwc_window->pending_update_list = eina_list_remove(hwc_window->pending_update_list, update); + if (update->hwc_window) e_hwc_window_unref(update->hwc_window); - hwc_window->pending_update_list = eina_list_remove(hwc_window->pending_update_list, update); - E_FREE(update); return EINA_TRUE; @@ -2826,11 +2826,11 @@ e_hwc_window_pending_update_data_enqueue(E_Hwc_Window *hwc_window, E_Hwc_Window_ e_comp_wl_buffer_reference(&update->buffer_ref, NULL); e_hwc_window_buffer_set(&update->buffer, NULL, NULL, 0); + hwc_window->pending_update_list = eina_list_remove(hwc_window->pending_update_list, update); + if (update->hwc_window) e_hwc_window_unref(update->hwc_window); - hwc_window->pending_update_list = eina_list_remove(hwc_window->pending_update_list, update); - E_FREE(update); return EINA_TRUE; -- 2.7.4