evas-wayland-shm: Don't leak rectangles during flush
authorChris Michael <cp.michael@samsung.com>
Thu, 8 Oct 2015 17:35:07 +0000 (13:35 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 8 Oct 2015 17:35:07 +0000 (13:35 -0400)
Summary: As we loop the regions of the output buffer and accumulate
changes to post, we should be freeing the rectangles when we are done
with them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 484da13..89c0474 100644 (file)
@@ -160,7 +160,10 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode
 
         /* loop the buffer regions and assign to result */
         EINA_ARRAY_ITER_NEXT(&ob->priv.onebuf_regions, i, rect, it)
-          result[i] = *rect;
+          {
+             result[i] = *rect;
+             evas_rectangle_free(rect);
+          }
 
         _evas_shm_surface_post(ob->surface, result, n);