mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
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)
This commit is contained in:
parent
0af76aa032
commit
ed3f611c41
@ -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
|
||||
|
10
gtk/gtkrc.c
10
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user