From 9c81224eb36c845978106927f8eea71c3f2e0743 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 2 Jul 2019 11:52:09 +0100 Subject: [PATCH] gl-renderer: Don't leak transformed region Unfortunately, our y_invert helper also forgot to free the region it transformed to. Clean up our allocation before we exit. Signed-off-by: Daniel Stone --- libweston/renderer-gl/gl-renderer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 5fcf023f..54f8b1cd 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1435,6 +1435,8 @@ pixman_region_to_egl_y_invert(struct weston_output *output, *d++ = box[i].x2 - box[i].x1; *d++ = box[i].y2 - box[i].y1; } + + pixman_region32_fini(&transformed); } /* NOTE: We now allow falling back to ARGB gl visuals when XRGB is