forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
d5dca93c58
commit
fb4b0ddff7
@ -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>
|
||||
|
@ -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>",
|
||||
|
Loading…
Reference in New Issue
Block a user