aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-10-17 14:08:32 +0900
committerHermet Park <hermetpark@gmail.com>2018-10-17 14:08:32 +0900
commitedab8f44a44bde2b1c66a568f5d5cd9c75122663 (patch)
treee73e0794285f21d5090d78ec98993c78605170d7
parentecore_wl2: Fix a memory leaking case (diff)
downloadefl-edab8f44a44bde2b1c66a568f5d5cd9c75122663.tar.gz
evas vg: fix memory leak at gradient.
Summary: free memory properly when object is deleted. @fix Reviewers: #committers, devilhorns Reviewed By: #committers, devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7165
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient.eo1
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
index 944b5f21a7..76502c826d 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
@@ -7,5 +7,6 @@ abstract Efl.Canvas.Vg.Gradient (Efl.Canvas.Vg.Node, Efl.Gfx.Gradient)
Efl.Gfx.Gradient.spread { get; set; }
Efl.Gfx.Path.interpolate;
Efl.Duplicate.duplicate;
+ Efl.Object.destructor;
}
}
diff --git a/src/lib/evas/canvas/evas_vg_gradient.c b/src/lib/evas/canvas/evas_vg_gradient.c
index b55f3c31a8..888c478582 100644
--- a/src/lib/evas/canvas/evas_vg_gradient.c
+++ b/src/lib/evas/canvas/evas_vg_gradient.c
@@ -96,6 +96,15 @@ _efl_canvas_vg_gradient_efl_gfx_path_interpolate(Eo *obj,
return EINA_TRUE;
}
+static void
+_efl_canvas_vg_gradient_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Gradient_Data *pd)
+{
+ if (pd->colors) free(pd->colors);
+
+ efl_destructor(efl_super(obj, MY_CLASS));
+}
+
+
EOLIAN static Efl_VG *
_efl_canvas_vg_gradient_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Gradient_Data *pd)