wayland-client: init a thread_data item before insert to a list
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 8 Dec 2021 04:22:37 +0000 (13:22 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 16 Feb 2023 10:12:29 +0000 (19:12 +0900)
Change-Id: Ib03c2bbbc454a383ab5abdc9504457cee041310f
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/wayland-client.c

index e36eb38..15fb51b 100644 (file)
@@ -1259,6 +1259,7 @@ get_thread_data(struct wl_display *display)
                thread_data->state = WL_THREAD_STATE_INITIAL;
                thread_data->thread_id = pthread_self();
 // END
+               wl_list_init(&thread_data->link);
                wl_list_insert(&display->threads, &thread_data->link);
                display->threads_count++;
                wl_log("Thread added[%p, pid:%d tid: %d] to display:%p, threads_cnt=%d, errno(%d, %m)\n",