forked from AuroraMiddleware/gtk
Don't leak buffer if an error occurs.
2007-11-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbuilder.c (gtk_builder_add_from_file): Don't leak buffer if an error occurs. svn path=/trunk/; revision=18979
This commit is contained in:
parent
6665188687
commit
06d28ff884
@ -1,3 +1,8 @@
|
||||
2007-11-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkbuilder.c (gtk_builder_add_from_file): Don't
|
||||
leak buffer if an error occurs.
|
||||
|
||||
2007-11-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkbuilderparser.c: More robustness improvements
|
||||
|
@ -667,14 +667,14 @@ gtk_builder_add_from_file (GtkBuilder *builder,
|
||||
buffer, length,
|
||||
&tmp_error);
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
if (tmp_error != NULL)
|
||||
{
|
||||
g_propagate_error (error, tmp_error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user