[gtk+] Fix leak when parsing image urls



commit cb625d21b4f19631cb52a44d4551295dfed19979
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Feb 6 15:06:29 2012 +0100

    Fix leak when parsing image urls

 gtk/gtkcssimageurl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssimageurl.c b/gtk/gtkcssimageurl.c
index 3e61432..51505c5 100644
--- a/gtk/gtkcssimageurl.c
+++ b/gtk/gtkcssimageurl.c
@@ -97,11 +97,11 @@ gtk_css_image_url_parse (GtkCssImage  *image,
 	  _gtk_css_parser_take_error (parser, error);
 	  return FALSE;
 	}
-      g_object_unref (file);
 
       pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (input), NULL, &error);
       g_object_unref (input);
     }
+  g_object_unref (file);
 
   if (pixbuf == NULL)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]