]> Pileus Git - ~andy/gtk/commitdiff
plug small memory leak (#370395)
authorPaolo Borelli <pborelli@katamail.com>
Mon, 13 Nov 2006 20:04:59 +0000 (20:04 +0000)
committerPaolo Borelli <pborelli@src.gnome.org>
Mon, 13 Nov 2006 20:04:59 +0000 (20:04 +0000)
2006-11-13  Paolo Borelli  <pborelli@katamail.com>

* gtk/gtkrc.c (gtk_rc_parse_icon_source): plug small memory
leak (#370395)

ChangeLog
gtk/gtkrc.c

index 55187d24364633da5ca7254dbed78f9f7e33be8c..dab4fd00ff27e0193ee3c4492839ea6ef604d65b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-13  Paolo Borelli  <pborelli@katamail.com>
+
+       * gtk/gtkrc.c (gtk_rc_parse_icon_source): plug small memory
+       leak (#370395)
+
 2006-11-09  Kristian Rietveld  <kris@imendio.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): disable
index c5bc23cf1449661a849c9d0b51cd006e400da050..087e8416db95974532120c06ea30d6a1f1b1935f 100644 (file)
@@ -4206,9 +4206,9 @@ gtk_rc_parse_icon_source (GtkRcContext   *context,
                           gboolean       *icon_set_valid)
 {
   guint token;
-  GtkIconSource *source;
   gchar *full_filename;
-  
+  GtkIconSource *source = NULL;
+
   token = g_scanner_get_next_token (scanner);
   if (token != G_TOKEN_LEFT_CURLY)
     return G_TOKEN_LEFT_CURLY;
@@ -4218,12 +4218,11 @@ gtk_rc_parse_icon_source (GtkRcContext   *context,
   if (token != G_TOKEN_STRING && token != '@')
     return G_TOKEN_STRING;
   
-  source = gtk_icon_source_new ();
-
   if (token == G_TOKEN_STRING)
     {
       /* Filename */
-      
+
+      source = gtk_icon_source_new ();      
       full_filename = gtk_rc_find_pixmap_in_path (context->settings, scanner, scanner->value.v_string);
       if (full_filename)
        {
@@ -4240,6 +4239,7 @@ gtk_rc_parse_icon_source (GtkRcContext   *context,
       if (token != G_TOKEN_STRING)
        return G_TOKEN_STRING;
 
+      source = gtk_icon_source_new ();
       gtk_icon_source_set_icon_name (source, scanner->value.v_string);
     }