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:
Matthias Clasen 2007-11-10 05:03:10 +00:00 committed by Matthias Clasen
parent 6665188687
commit 06d28ff884
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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;
}