evas: gl_generic: fix leak if we return dst and not newdst
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 7 Sep 2015 11:41:47 +0000 (13:41 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Mon, 7 Sep 2015 11:41:47 +0000 (13:41 +0200)
In case we still retrun dst we should make sure we free up the newly
allocated newdst.

CID: 1323090

src/modules/evas/engines/gl_generic/evas_engine.c

index 0153c80..04a26ec 100644 (file)
@@ -1278,6 +1278,7 @@ eng_image_scaled_update(void *data EINA_UNUSED, void *scaled, void *image,
                   dst->w = dst_w;
                   dst->h = dst_h;
                   dst->scaled.smooth = smooth;
+                  free(newdst);
                   return dst;
                }
              src->references++;