From f256301a3eadb37419d6f957fbb4800c54a817da Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 3 Sep 2012 10:13:09 +0200 Subject: [PATCH] Fix region leak in gtk2 compat defines https://bugs.freedesktop.org/show_bug.cgi?id=54277 --- gtk/spice-widget-cairo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c index 8f424cb..9ddbe51 100644 --- a/gtk/spice-widget-cairo.c +++ b/gtk/spice-widget-cairo.c @@ -78,7 +78,7 @@ void spicex_image_destroy(SpiceDisplay *display) #define cairo_rectangle_int_t GdkRectangle #define cairo_region_t GdkRegion #define cairo_region_create_rectangle gdk_region_rectangle -#define cairo_region_subtract_rectangle(_dest,_rect) { GdkRegion *_region = gdk_region_rectangle (_rect); gdk_region_subtract (_dest, _region); } +#define cairo_region_subtract_rectangle(_dest,_rect) { GdkRegion *_region = gdk_region_rectangle (_rect); gdk_region_subtract (_dest, _region); gdk_region_destroy (_region); } #define cairo_region_destroy gdk_region_destroy #endif -- 1.7.12