e_input_thread_client: Prevent double free 42/311042/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 13 May 2024 07:00:09 +0000 (16:00 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 13 May 2024 07:57:11 +0000 (16:57 +0900)
Change-Id: Id878d750788110df0a07e7f55bda9d7b32f6d541
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/e_input_thread_client.c

index 74a54a7..46699e4 100644 (file)
@@ -40,7 +40,7 @@ e_input_thread_client_shutdown()
 EINTERN E_Input_Thread_Client *
 e_input_thread_client_new(E_Client *ec, struct wl_resource *surface)
 {
-   E_Input_Thread_Client *itc = calloc(1, sizeof(E_Input_Thread_Client));
+   E_Input_Thread_Client *itc = E_NEW(E_Input_Thread_Client, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(itc, NULL);
 
    itc->ec = ec;
@@ -59,9 +59,11 @@ e_input_thread_client_free(E_Input_Thread_Client *iec)
 {
    EINA_SAFETY_ON_NULL_RETURN(iec);
 
+   INF("[%s] iec(%p), ec(%p)", __func__, iec, iec->ec);
+
    _itc_list = eina_list_remove(_itc_list, iec);
 
-   free(iec);
+   E_FREE(iec);
 }
 
 EINTERN void