Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix leak of libxml2 internal xmlSAXHandler

  • Loading branch information...
commit de3c328c290b3100db4cf813a4a3350f5d01b1e7 1 parent 7675080
@triccardi-systran triccardi-systran authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/xml_sax_parser.cc
View
3  src/xml_sax_parser.cc
@@ -196,9 +196,10 @@ XmlSaxParser::parse_string(const char* str,
context_ = xmlCreateMemoryParserCtxt(str, size);
initializeContext();
context_->replaceEntities = 1;
+ xmlSAXHandler* old_sax = context_->sax;
context_->sax = &sax_handler_;
xmlParseDocument(context_);
- context_->sax = NULL;
+ context_->sax = old_sax;
releaseContext();
}

0 comments on commit de3c328

Please sign in to comment.
Something went wrong with that request. Please try again.