Fixed memory leak of ecore event 54/122754/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Mon, 3 Apr 2017 09:09:13 +0000 (18:09 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Mon, 3 Apr 2017 09:09:13 +0000 (18:09 +0900)
Change-Id: Iaa1eeff48f22b0713bc547a2774862559980ecab
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/e_mod_effect_rotation.c

index b605fd50cb63dad224b5122d576c51efc8a93bb4..7f757a5fb64885ac8866c3d212cb1db8c168432b 100644 (file)
@@ -69,6 +69,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)
 {
@@ -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);
 }