cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fdd501b773e6ef8529e44a8a6feb25e66143f1f0
commit fdd501b773e6ef8529e44a8a6feb25e66143f1f0 Author: Chinmaya Panigrahi <[email protected]> Date: Thu Sep 11 12:54:18 2014 +0200 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 <[email protected]> --- src/modules/evas/engines/software_x11/evas_xlib_color.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/software_x11/evas_xlib_color.c b/src/modules/evas/engines/software_x11/evas_xlib_color.c index 55920e1..87e1453 100644 --- a/src/modules/evas/engines/software_x11/evas_xlib_color.c +++ b/src/modules/evas/engines/software_x11/evas_xlib_color.c @@ -342,9 +342,10 @@ evas_software_xlib_x_color_allocate(Display *disp, palpriv->cmap = cmap; if (pal->colors == PAL_MODE_NONE) { - if (pal->lookup) free(pal->lookup); - free(pal); - return NULL; + if (pal->lookup) free(pal->lookup); + free(palpriv); + free(pal); + return NULL; } palettes = eina_list_append(palettes, pal); return pal; --
