Replace of gdome_xml_str_mkref_own() and gdome_xml_str_mkref() by gdome_xml_mkref_xml() has incorrect behaviour

View: New views
1 Messages — Rating Filter:   Alert me  

Replace of gdome_xml_str_mkref_own() and gdome_xml_str_mkref() by gdome_xml_mkref_xml() has incorrect behaviour

by Rabi_huawei :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all

 As a fix (Fixes for libxml strings) to avoid the misuse of g_free() by the gdome functions, the gdome_xml_str_mkref_own() and gdome_xml_str_mkref() were replaced by  gdome_xml_str_mkref_xml() to create a GdomeDOMString object for strings allocated by libxml in some xml functions like gdome_xml_el_getAttribute() gdome_xml_cd_appendData etc. But this causes segmentation faults as the gdome_xml_str_mkref_xml() do not make any copy of the string passed to it. And the gdome_xml_str_unref_xml()  frees the  memory by xmlFree(self->str) that is allocated by Libxml and this causes the problem when libxml again tries to free the same memory location.

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome