Skip to content

Conversation

@nerg4l
Copy link
Contributor

@nerg4l nerg4l commented Nov 29, 2023

libxml_use_internal_errors(true) starts to write errors to an internal buffer. That buffer should be cleared after usage.

The documentation of libxml_use_internal_errors says:

[...] Disabling will also clear any existing libxml errors.

But this does not seem to be true. However, the top "User Contributed Notes" says the following:

When using this funtion, be sure to clear your internal error buffer. If you dn't and you are using this in a long running process, you may find that all your memory is used up.

The solution is to call libxml_clear_errors after using the internal error buffer.

@oscarotero oscarotero merged commit 3e78a87 into oscarotero:master Nov 29, 2023
@oscarotero
Copy link
Owner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants