From 70240f344e31c2bc46f1f2450150de8be841a901 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 27 Mar 2023 15:18:38 +0900 Subject: [PATCH] Prevent from adding empty gesture event gesture event should not be added if allocating memory for e_info->event is failed Change-Id: I770c8b0154cce1c5069b01af08b442881739558e Signed-off-by: Jihoon Kim --- src/e_mod_gesture_events.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/e_mod_gesture_events.c b/src/e_mod_gesture_events.c index 2ce98c7..b8a77d1 100644 --- a/src/e_mod_gesture_events.c +++ b/src/e_mod_gesture_events.c @@ -60,9 +60,13 @@ _e_gesture_event_queue(int type, void *event) if (e_info->event) memcpy(e_info->event, event, sizeof(Ecore_Event_Mouse_Move)); } - else goto error; + else goto error; + + if (e_info->event) + gesture->event_queue = eina_list_append(gesture->event_queue, e_info); + else + E_FREE(e_info); - gesture->event_queue = eina_list_append(gesture->event_queue, e_info); return; error: -- 2.7.4