e_hwc_window: fix accessing the hwc_window after it is unreferenced 30/266930/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 23 Nov 2021 00:29:16 +0000 (09:29 +0900)
committerchangyeon lee <cyeon.lee@samsung.com>
Tue, 23 Nov 2021 01:08:05 +0000 (01:08 +0000)
Change-Id: Ic7b3c5f5455479947241a47b467a77100ac3731f

src/bin/e_hwc_window.c

index b0311cd13944f44fe61a1c1fccedf71313050aab..b3b87ba7f638d0b5de938d070d7f5383e2e41a46 100644 (file)
@@ -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;