We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please describe the bug
When parsing a RelaxNG schema, the schema context is not freed, resulting in leaked memory.
Help us reproduce what you're seeing
#! /usr/bin/env ruby require "nokogiri" loop do Nokogiri::XML::RelaxNG.from_document(Nokogiri::XML::Document.parse(File.read("/home/flavorjones/code/oss/nokogiri/test/files/address_book.rlx"))) end
Expected behavior
No memory should be leaked.
Additional context
I believe we just need to add a call to xmlRelaxNGFreeParserCtxt(ctx); in both read_memory and from_document in xml_relax_ng.c
xmlRelaxNGFreeParserCtxt(ctx);
read_memory
from_document
xml_relax_ng.c
The text was updated successfully, but these errors were encountered:
fix(memory): Ensure RelaxNG parsing does not leak the parser context
d170010
Fixes #2114
80fafb6
1b87c5c
47e2516
No branches or pull requests
Please describe the bug
When parsing a RelaxNG schema, the schema context is not freed, resulting in leaked memory.
Help us reproduce what you're seeing
Expected behavior
No memory should be leaked.
Additional context
I believe we just need to add a call to
xmlRelaxNGFreeParserCtxt(ctx);
in bothread_memory
andfrom_document
inxml_relax_ng.c
The text was updated successfully, but these errors were encountered: