Hi,
My server (c++/multithreaded/linux) is using libxml2 version 2.6.11.
In the startup the main thread call xmlInitParser, and in case of initiated
shutdown call to xmlCleanupParser.
A thread may call “xmlParseFile” with nonexisting filename.
Purify point to memory-leak each time “xmlParseFile” attempt to load
nonexisting file:
MLK: 75 bytes leaked at 0x10f02ca0
This memory was allocated from:
malloc [rtlib.o]
xmlStrndup [libxml2.so.2]
xmlStrdup [libxml2.so.2]
xmlCopyError [libxml2.so.2]
__xmlRaiseError [libxml2.so.2]
__xmlLoaderErr [libxml2.so.2]
MLK: 41 bytes leaked at 0x18f71420
This memory was allocated from:
malloc [rtlib.o]
xmlStrndup [libxml2.so.2]
xmlStrdup [libxml2.so.2]
xmlCopyError [libxml2.so.2]
__xmlRaiseError [libxml2.so.2]
__xmlLoaderErr [libxml2.so.2]
What is the right approach to catch and clean this memory?
Should I use xmlGenericErrorFunc (void * ctx, const char * msg) … but what
to delete?
Thanks In Advanced,
Tamar
--
View this message in context:
http://www.nabble.com/xmlParseFile---calling-with-nonexisting-filename-and-memory-leak-tp14566740p14566740.html
Sent from the Gnome - Lib - Xml - General mailing list archive at Nabble.com.
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml