ector cairo: fix a memory leak.

Here don't need to use heap memory.

@fix
This commit is contained in:
Hermet Park 2018-04-20 15:47:40 +09:00
parent a07d729b2f
commit 7048cc6259
1 changed files with 3 additions and 4 deletions

View File

@ -60,7 +60,7 @@ _ector_renderer_cairo_gradient_radial_prepare(Eo *obj,
{
Ector_Renderer_Data *pd = efl_data_scope_get(obj, ECTOR_RENDERER_CLASS);
cairo_pattern_t *pat;
cairo_matrix_t *pd_m;
cairo_matrix_t pd_m;
pat = cairo_pattern_create_radial(grd->focal.x, grd->focal.y, 0,
grd->radial.x, grd->radial.y, grd->radius);
@ -70,14 +70,13 @@ _ector_renderer_cairo_gradient_radial_prepare(Eo *obj,
cairo_pattern_set_extend(pat, _ector_cairo_extent_get(gd->s));
pd_m = malloc(sizeof (cairo_matrix_t));
if (pd->m)
{
cairo_matrix_init(pd_m,
cairo_matrix_init(&pd_m,
pd->m->xx, pd->m->yx,
pd->m->xy, pd->m->yy,
pd->m->xz, pd->m->yz);
cairo_pattern_set_matrix(pat, pd_m);
cairo_pattern_set_matrix(pat, &pd_m);
}
return pat;