From: Joogab Yun Date: Fri, 10 Mar 2017 06:43:47 +0000 (+0900) Subject: [evas_engine] SW backend : fixed tbm leak X-Git-Tag: submit/tizen/20170406.055746~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a5572f404f8a4e3b81cc7766e875a129764751a;p=platform%2Fupstream%2Fefl.git [evas_engine] SW backend : fixed tbm leak if native surface set NULL, func.free is not called Change-Id: I687e494d68ccbf06e8577fa752f25f9a3139e0fa --- diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index 09dde2d..7835b59 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -298,7 +298,7 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) RGBA_Image *im = image, *im2; void *wl_buf = NULL; - if (!im || !ns) return im; + if (!im) return im; if (ns) { @@ -346,6 +346,8 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) im->native.func.free(im->native.func.data, im); } + if (!ns) return im; + #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie)) evas_cache2_image_close(ie);