[gtk: 1/2] gdkpixbuf-drawable: Free the pixbuf on Cairo error
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] gdkpixbuf-drawable: Free the pixbuf on Cairo error
- Date: Mon, 14 Dec 2020 15:12:57 +0000 (UTC)
commit dc96542742e3364b005f0d7403ddc9bb4248aa34
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Dec 14 13:39:42 2020 +0100
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]