From 65401ed3f98928b6cdddc2099909ac26cceaed65 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sat, 11 Jan 2020 19:58:31 +0100 Subject: [PATCH] clutter/cogl: Plug region leak in clutter_stage_cogl_redraw_view Fixes https://gitlab.gnome.org/GNOME/mutter/issues/1000 --- clutter/clutter/cogl/clutter-stage-cogl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c index 64317b6f1..9b26d5553 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/clutter/cogl/clutter-stage-cogl.c @@ -691,7 +691,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window, gboolean do_swap_buffer; gboolean swap_with_damage; ClutterActor *wrapper; - cairo_region_t *redraw_clip; + cairo_region_t *redraw_clip = NULL; cairo_region_t *fb_clip_region; cairo_region_t *swap_region; cairo_rectangle_int_t redraw_rect; @@ -782,6 +782,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window, { cairo_rectangle_int_t rect = { 0, 0, view_rect.width, view_rect.height }; fb_clip_region = cairo_region_create_rectangle (&rect); + g_clear_pointer (&redraw_clip, cairo_region_destroy); redraw_clip = cairo_region_copy (fb_clip_region); }