diff options
author | Paolo Borelli <pborelli@katamail.com> | 2006-11-13 20:04:59 +0000 |
---|---|---|
committer | Paolo Borelli <pborelli@src.gnome.org> | 2006-11-13 20:04:59 +0000 |
commit | ed3f611c4157e9969e688cc91056d810290e7c16 (patch) | |
tree | 2d067084a872a7992b6a680b68ea8774badb46d0 /gtk/gtkrc.c | |
parent | 0af76aa032384b00aefb4330aaa257f4b3be94a7 (diff) | |
download | gtk+-ed3f611c4157e9969e688cc91056d810290e7c16.tar.gz |
plug small memory leak (#370395)
2006-11-13 Paolo Borelli <pborelli@katamail.com>
* gtk/gtkrc.c (gtk_rc_parse_icon_source): plug small memory
leak (#370395)
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r-- | gtk/gtkrc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index c5bc23cf14..087e8416db 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -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); } |