[bijiben] icons: fix a small leak



commit ce015fa01785a2d2071d787e5308ccaf831ae1cd
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Mon Feb 11 01:14:50 2013 +0100

    icons: fix a small leak

 src/utils/bjb-icons-colors.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/utils/bjb-icons-colors.c b/src/utils/bjb-icons-colors.c
index 04976bf..9a8f95c 100644
--- a/src/utils/bjb-icons-colors.c
+++ b/src/utils/bjb-icons-colors.c
@@ -1,12 +1,17 @@
 #include "bjb-bijiben.h"
 #include "bjb-icons-colors.h"
 
-GtkWidget *get_icon (gchar *icon)
+GtkWidget *
+get_icon (gchar *icon)
 {
-  GIcon *gi ;
-    
+  GIcon *gi;
+  GtkWidget *retval;
+
   gi = g_themed_icon_new_with_default_fallbacks (icon);
-  return gtk_image_new_from_gicon (gi,GTK_ICON_SIZE_BUTTON);
+  retval = gtk_image_new_from_gicon (gi, GTK_ICON_SIZE_BUTTON);
+  g_object_unref (gi);
+
+  return retval;
 }
 
 /* TODO


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