cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=77a732eb8b1378b1b5c9794b05c61319bf6603ea
commit 77a732eb8b1378b1b5c9794b05c61319bf6603ea Author: Cedric BAIL <[email protected]> Date: Sun Oct 4 17:36:42 2015 +0200 ector: fix leak of dash info in Cairo backend. CID 1316270 --- src/lib/ector/cairo/ector_renderer_cairo_shape.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c index c598a2c..0f9193e 100644 --- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c +++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c @@ -166,7 +166,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend { int r, g, b, a; unsigned i; - double *dashinfo; + if (pd->path == NULL) return EINA_FALSE; USE(obj, cairo_save, EINA_FALSE); @@ -206,6 +206,8 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend cairo_set_source_rgba(pd->parent->cairo, r/255.0, g/255.0, b/255.0, a/255.0); if (pd->shape->stroke.dash) { + double *dashinfo; + dashinfo = (double *) malloc(2 * pd->shape->stroke.dash_length * sizeof(double)); for (i = 0; i < pd->shape->stroke.dash_length; i++) { @@ -214,6 +216,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend } USE(obj, cairo_set_dash, EINA_FALSE); cairo_set_dash(pd->parent->cairo, dashinfo, pd->shape->stroke.dash_length * 2, 0); + free(dashinfo); } } --
