summaryrefslogtreecommitdiff
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
parentd5dca93c58112e1966d22430d1612e87a7334fff (diff)
downloadgdk-pixbuf-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
-rw-r--r--ChangeLog6
-rw-r--r--gtk/gtkbuilder.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a4323d70..5c2da1ff5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2007-11-08 Michael Natterer <mitch@imendio.com>
* gtk/gtkbuildable.h: include <glib.h> instead of <glib/gmarkup.h>
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index e5b51cab9..a5c9fd683 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>",