PATCH libglade crash on bad XML



Called g_free() on a GObject (whoops)

diff --git a/glade-xml.c.orig b/glade-xml.c
index 8e06da6..b7a87a1 100644
--- a/glade-xml.c.orig
+++ b/glade-xml.c
@@ -256,7 +256,7 @@ glade_xml_new_from_buffer(const char *buffer, int size, cons
     if( !glade_xml_construct_from_buffer(self, buffer, size, root, domain) )
     {
        /* Clean up, the parser was unable to load the object */
-       g_free(self);
+       g_object_unref(self);
        return NULL;
     }
 

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]