From c4f8eb7ec998f1200a5e662e00bad04acf0eb0ea Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Mon, 14 Dec 2020 13:39:42 +0100 Subject: [PATCH] gdkpixbuf-drawable: Free the pixbuf on Cairo error This avoids leaking the pixbuf. --- gdk/gdkpixbuf-drawable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c index d2c142ae43..603c8fff45 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -288,6 +288,7 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface, if (cairo_surface_status (surface) || dest == NULL) { cairo_surface_destroy (surface); + g_clear_object (&dest); return NULL; }