From 7bf10147296ff7a4ae7be3d56d2d4d9742b587e2 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Mon, 12 Nov 2018 06:17:02 +0100 Subject: Fix memory leak in handle --- gdk-pixbuf-loader/io-svg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdk-pixbuf-loader') diff --git a/gdk-pixbuf-loader/io-svg.c b/gdk-pixbuf-loader/io-svg.c index 0e7bf13d..06b5aef9 100644 --- a/gdk-pixbuf-loader/io-svg.c +++ b/gdk-pixbuf-loader/io-svg.c @@ -154,8 +154,11 @@ gdk_pixbuf__svg_image_stop_load (gpointer data, GError **error) return FALSE; } - if (!rsvg_handle_close (context->handle, error)) + if (!rsvg_handle_close (context->handle, error)) { + g_object_unref (context->handle); + g_free (context); return FALSE; + } pixbuf = rsvg_handle_get_pixbuf (context->handle); -- cgit v1.2.1