e_policy_visibility: modify code to clone the wait_buf_attach_grab_list 21/268621/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 28 Dec 2021 02:50:12 +0000 (11:50 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 28 Dec 2021 06:58:28 +0000 (15:58 +0900)
In e_policy_visibility_client_uniconify_by_visibility_job_cancel, we freed wait_buf_attach_grab_list,
and then we tried to call _e_vis_grab_release. So, no grab was freed.
To fix this, we add code to clone the wait_buf_attach_grab_list first.
Then, we free the wait_buf_attach_grab_list, and call the _e_vis_grab_release using cloned list.

Change-Id: I70636d159b0b6558b967b08ce4212879403760bb

src/bin/e_policy_visibility.c

index a669939..f9eba3e 100644 (file)
@@ -2338,7 +2338,7 @@ e_policy_visibility_client_uniconify_by_visibility_job_cancel(E_Client *ec)
         E_Vis_Grab *grab;
         Eina_List *l;
 
-        l = vc->wait_buf_attach_grab_list;
+        l = eina_list_clone(vc->wait_buf_attach_grab_list);
         vc->wait_buf_attach_grab_list = eina_list_free(vc->wait_buf_attach_grab_list);
         EINA_LIST_FREE(l, grab)
           {