Hello, The use of xmlNewTextReaderFilename might create a memory leak, because no one expects that xmlGetCharEncodingHandler() is called (enc==XML_CHAR_ENCODING_NONE!). So nobody calls xmlCleanupCharEncoding().
There are two possibilities to solve this problem: Best version: I would divide the switch-Statement in xmlGetCharEncodingHandler() (encoding.c) in two parts. The first part has all the NULL-returns, the second has the rest. Between both is the xmlInitCharEncodingHandlers()-call. Second version: The last statement in xmlFreeTextReader should be xmlCleanupCharEncoding(). Greetings Michael _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
