elm_image: Fix memory leak in GETDAT macro.

Free data2 on error path.

CID: 1265609, 1265610, 1265611, 1265612
This commit is contained in:
Stefan Schmidt 2015-01-23 12:43:49 +01:00
parent a31628cb2e
commit 969f9c1970
1 changed files with 4 additions and 1 deletions

View File

@ -1131,7 +1131,10 @@ _elm_image_smart_rotate_180(Elm_Image_Data *sd)
w = neww; h = newh; \
evas_object_image_size_set(sd->img, w, h); \
data = evas_object_image_data_get(sd->img, EINA_TRUE); \
if (!data) return
if (!data) { \
free(data2); \
return; \
} \
#define PUTDAT \
evas_object_image_data_set(sd->img, data); \