From 85b50db300141e881b273ee1a7384c005d56c8c1 Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Mon, 3 Apr 2017 18:09:13 +0900 Subject: [PATCH] Fixed memory leak of ecore event Change-Id: Iaa1eeff48f22b0713bc547a2774862559980ecab Signed-off-by: MinJeong Kim --- src/e_mod_effect_rotation.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/e_mod_effect_rotation.c b/src/e_mod_effect_rotation.c index b605fd5..7f757a5 100644 --- a/src/e_mod_effect_rotation.c +++ b/src/e_mod_effect_rotation.c @@ -70,6 +70,12 @@ typedef struct _Rotation_Zone static Rotation_Zone *_rotation_zone = NULL; static void +_rotation_effect_event_free(void *data EINA_UNUSED, void *event) +{ + free(event); +} + +static void _rotation_effect_ready_send(E_Zone *zone) { E_Event_Zone_Rotation_Effect_Ready *ev; @@ -78,7 +84,7 @@ _rotation_effect_ready_send(E_Zone *zone) if (!ev) return; ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_READY, ev, NULL, NULL); + ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_READY, ev, _rotation_effect_event_free, NULL); EFFINF("Rotation Effect Event Ready", NULL, NULL); } @@ -92,7 +98,7 @@ _rotation_effect_cancel_send(E_Zone *zone) if (!ev) return; ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_CANCEL, ev, NULL, NULL); + ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_CANCEL, ev, _rotation_effect_event_free, NULL); EFFINF("Rotation Effect Event Cancel", NULL, NULL); } @@ -106,7 +112,7 @@ _rotation_effect_done_send(E_Zone *zone) if (!ev) return; ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_DONE, ev, NULL, NULL); + ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_DONE, ev, _rotation_effect_event_free, NULL); EFFINF("Rotation Effect Event Done", NULL, NULL); } -- 2.7.4