gtkdnd: Plug a leak
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 25 Jun 2015 12:58:00 +0000 (14:58 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 Jun 2015 13:09:56 +0000 (15:09 +0200)
We create a cairo_t in order to find out the surface extents, but it
was being leaked, dragging the whole drag surface with it through
extra refs.

gtk/gtkdnd.c

index 56fcc25b0a969583db6fa588512bd1f417a9f71b..3f63d5b36392bf6aa4d7fdbb3af6c7fe5a6f0248 100644 (file)
@@ -3275,6 +3275,7 @@ _gtk_cairo_surface_extents (cairo_surface_t *surface,
 
   cr = cairo_create (surface);
   cairo_clip_extents (cr, &x1, &y1, &x2, &y2);
+  cairo_destroy (cr);
 
   x1 = floor (x1);
   y1 = floor (y1);