From aa6d4a3756b8f173d091ccf9f5751b910d6a6b62 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 29 Oct 2013 15:12:58 +0900 Subject: evas/cserve2: Fix error path in evas_cache2_image_writable() Return NULL and check for nullity in the only calling function. Fixes CID 1039461 (Logically dead code) --- src/lib/evas/cache2/evas_cache2.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/lib/evas/cache2') diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c index 35cceb6e65..d4b2b5353b 100644 --- a/src/lib/evas/cache2/evas_cache2.c +++ b/src/lib/evas/cache2/evas_cache2.c @@ -1089,15 +1089,13 @@ evas_cache2_image_writable(Image_Entry *im) evas_cache2_image_pixels(im), im->flags.alpha, im->space); if (!im2) - goto on_error; + { + ERR("Could not create a copy of this image (%dx%d)", im->w, im->h); + return NULL; + } evas_cache2_image_close(im); return im2; - -on_error: - if (im2) - _evas_cache2_image_entry_delete(cache, im2); - return NULL; } EAPI Image_Entry * -- cgit v1.2.1