[xml] [PATCH] fix memory leak xml header encoding field in combination with XML_PARSE_IGNORE_ENC

2014-04-10 Thread Bart De Schuymer
: xmlParseXMLDecl (parser.c:10534) ==1964==by 0x4E8B737: xmlParseTryOrFinish (parser.c:11293) ==1964==by 0x4E8E775: xmlParseChunk (parser.c:12283) Best regards, Bart Signed-off-by: Bart De Schuymer diff --git a/parser.c b/parser.c index 9347ac9..3ce1eb0 100644 --- a/parser.c +++ b/parser.c

[xml] memory leak: attribute values are not freed when exception is thrown in the startElement callback

2014-04-10 Thread Bart De Schuymer
Hello, We tried using libxml2 configured with the --with-fexceptions option and have identified a memory leak when our C++ startElement callback throws an exception. The cause of the leak is as follows: xmlParseStartTag frees all attribute values after calling the startElement callback, but since

Re: [xml] memory leak: attribute values are not freed when exception is thrown in the startElement callback

2014-04-10 Thread Bart De Schuymer
On Thu, Apr 10, 2014 at 2:30 PM, Nikolay Sivov wrote: > On 4/10/2014 16:20, Bart De Schuymer wrote: > >Hello, > > We tried using libxml2 configured with the --with-fexceptions option and > have identified a memory leak when our C++ startElement callback throws an > ex