e_hwc_windows: use EINA_LIST_FOREACH_SAFE when release commit_data 50/220450/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 13 Dec 2019 03:49:13 +0000 (12:49 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 18 Dec 2019 09:48:14 +0000 (18:48 +0900)
it is possible that e_hwc_window is freed when release commit_data

Change-Id: I2d471fe0cc5ad9305327f145cdf00b6e4791c9b2

src/bin/e_hwc_windows.c

index 33592f95cfa25c0ee1f694f19bba6df1e5df81c1..3a0c1b146799f0b85dc814a4753f9797963bffff 100644 (file)
@@ -278,7 +278,7 @@ static void
 _e_hwc_windows_commit_data_release(E_Hwc *hwc, int sequence,
                                   unsigned int tv_sec, unsigned int tv_usec)
 {
-   const Eina_List *l;
+   const Eina_List *l, *ll;
    E_Hwc_Window *hwc_window;
 
    e_hwc_window_presentation_time_feedback_present(((E_Hwc_Window *)hwc->target_hwc_window),
@@ -286,7 +286,7 @@ _e_hwc_windows_commit_data_release(E_Hwc *hwc, int sequence,
                                                    tv_sec,
                                                    tv_usec);
 
-   EINA_LIST_FOREACH(hwc->hwc_windows, l, hwc_window)
+   EINA_LIST_FOREACH_SAFE(hwc->hwc_windows, l, ll, hwc_window)
      {
          if (!hwc_window->commit_data) continue;