forked from enlightenment/efl
Evas: fix resource leak.
Summary: Variable palpriv is going out of scope and leaks the storage it points to, if we do not free it before exiting. Test Plan: NA Reviewers: seoz, raster, cedric Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D1429 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
44cecb6a87
commit
fdd501b773
|
@ -342,9 +342,10 @@ evas_software_xlib_x_color_allocate(Display *disp,
|
||||||
palpriv->cmap = cmap;
|
palpriv->cmap = cmap;
|
||||||
if (pal->colors == PAL_MODE_NONE)
|
if (pal->colors == PAL_MODE_NONE)
|
||||||
{
|
{
|
||||||
if (pal->lookup) free(pal->lookup);
|
if (pal->lookup) free(pal->lookup);
|
||||||
free(pal);
|
free(palpriv);
|
||||||
return NULL;
|
free(pal);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
palettes = eina_list_append(palettes, pal);
|
palettes = eina_list_append(palettes, pal);
|
||||||
return pal;
|
return pal;
|
||||||
|
|
Loading…
Reference in New Issue