summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-11-09 00:33:45 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-11-09 00:33:45 +0000
commitfb4b0ddff7ef037deed934a324b2b658812ad17a (patch)
tree8eb09411b064b5f98c90a593b6b6f1b75006bc9b /gtk/gtkbuilder.c
parentd5dca93c58112e1966d22430d1612e87a7334fff (diff)
downloadgtk+-fb4b0ddff7ef037deed934a324b2b658812ad17a.tar.gz
don't leak 'filename' field memory when loading more than one file into
2007-11-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbuilder.c: don't leak 'filename' field memory when loading more than one file into the same GtkBuilder instance. Noticed by Ryan Lortie. svn path=/trunk/; revision=18973
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r--gtk/gtkbuilder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index e5b51cab9a..a5c9fd683f 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -660,6 +660,7 @@ gtk_builder_add_from_file (GtkBuilder *builder,
return 0;
}
+ g_free (builder->priv->filename);
builder->priv->filename = g_strdup (filename);
_gtk_builder_parser_parse_buffer (builder, filename,
@@ -704,6 +705,7 @@ gtk_builder_add_from_string (GtkBuilder *builder,
tmp_error = NULL;
+ g_free (builder->priv->filename);
builder->priv->filename = g_strdup (".");
_gtk_builder_parser_parse_buffer (builder, "<input>",