From c599aa68ad517ac070ad159cbae3fa7f19c9b6ee Mon Sep 17 00:00:00 2001 From: Hubert Stachowiak Date: Thu, 8 Dec 2022 08:56:25 +0100 Subject: [PATCH] edje_message_queue.c Fix invalid pointer In _edje_msg_trash_clear freeing Edje_Message pointer could cause invalid pointer error because _edje_msg_trash_pop function would sometimes return the same pointer twice. Change-Id: I845d576b80924200092fd9647c64aacec70aa866 --- src/lib/edje/edje_message_queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/edje/edje_message_queue.c b/src/lib/edje/edje_message_queue.c index b579a33..90a8f7b 100644 --- a/src/lib/edje/edje_message_queue.c +++ b/src/lib/edje/edje_message_queue.c @@ -31,6 +31,9 @@ _edje_msg_trash_pop(void) em = INLIST_CONTAINER(Edje_Message, _edje_msg_trash, inlist_main); _edje_msg_trash = eina_inlist_remove(_edje_msg_trash, &(em->inlist_main)); memset(em, 0, sizeof(Edje_Message)); +// TIZEN_ONLY (20221208) : edje_message_queue.c Fix invalid pointer + if (em == _edje_msg_trash) _edje_msg_trash = NULL; +// return em; } -- 2.7.4