gtk+ r20346 - in trunk: . gtk



Author: pborelli
Date: Tue Jun 10 11:50:43 2008
New Revision: 20346
URL: http://svn.gnome.org/viewvc/gtk+?rev=20346&view=rev

Log:
2008-06-10  Paolo Borelli  <pborelli katamail com>

	* gtk/gtkfilesystem.c (gtk_file_system_volume_render_icon): do not
	leak the GIcon.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkfilesystem.c

Modified: trunk/gtk/gtkfilesystem.c
==============================================================================
--- trunk/gtk/gtkfilesystem.c	(original)
+++ trunk/gtk/gtkfilesystem.c	Tue Jun 10 11:50:43 2008
@@ -1697,6 +1697,7 @@
 				    GError              **error)
 {
   GIcon *icon = NULL;
+  GdkPixbuf *pixbuf;
 
   DEBUG ("volume_get_icon_name");
 
@@ -1713,6 +1714,7 @@
 
       file = g_mount_get_root (mount);
       icon = get_icon_for_special_directory (file);
+      g_object_unref (file);
 
       if (!icon)
 	icon = g_mount_get_icon (mount);
@@ -1721,7 +1723,11 @@
   if (!icon)
     return NULL;
 
-  return get_pixbuf_from_gicon (icon, widget, icon_size, error);
+  pixbuf = get_pixbuf_from_gicon (icon, widget, icon_size, error);
+
+  g_object_unref (icon);
+
+  return pixbuf;
 }
 
 void



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