From dc96542742e3364b005f0d7403ddc9bb4248aa34 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 3b7c717bb9..b0d113cfaf 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -202,6 +202,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; }