summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2015-04-30 20:43:18 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2015-04-30 20:43:18 +0000
commit1432d23e983fa6b033411f6b03c4e72a97331f54 (patch)
tree66a3082540ca8bfba05c747fac89755b2a8ff6c8 /gdk/gdkwindow.c
parent7b9e9027e731af922f77aaf032cf46f8c8077f49 (diff)
downloadgtk+-1432d23e983fa6b033411f6b03c4e72a97331f54.tar.gz
Fix use-after-free in gdk_window_end_paint()
It's a miracle that this code ever worked.
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 8c85cb79cb..65db5e8753 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3111,7 +3111,6 @@ gdk_window_end_paint (GdkWindow *window)
{
surface = gdk_window_ref_impl_surface (window);
cr = cairo_create (surface);
- cairo_surface_destroy (surface);
cairo_set_source_surface (cr, window->current_paint.surface, 0, 0);
gdk_cairo_region (cr, window->current_paint.region);
@@ -3123,6 +3122,7 @@ gdk_window_end_paint (GdkWindow *window)
cairo_destroy (cr);
cairo_surface_flush (surface);
+ cairo_surface_destroy (surface);
}
}