emile: Fix resource leak
authorChris Michael <cp.michael@samsung.com>
Mon, 20 Apr 2015 17:06:41 +0000 (13:06 -0400)
committerChris Michael <cp.michael@samsung.com>
Mon, 20 Apr 2015 17:06:41 +0000 (13:06 -0400)
Summary: This fixes Coverity CID1288918 where data_start variable was
being leaked if the rectangles did not intersect.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/emile/emile_image.c

index dc8af2c196c6c48fd457bcccbd5d6f32e4fa694a..330bc2fec97eca1bcfefb1b9218d82f01b522606 100644 (file)
@@ -510,7 +510,10 @@ _emile_tgv_data(Emile_Image *image,
                                image->block.width, image->block.height);
 
             if (!eina_rectangle_intersection(&current, &master))
-              continue;
+              {
+                 eina_binbuf_free(data_start);
+                 continue;
+              }
 
             if (image->compress)
               {