Skip to content
New issue

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

Fix #69373 References to deleted XPath query results #1216

Closed
wants to merge 3 commits into from

Conversation

ttoohey
Copy link
Contributor

@ttoohey ttoohey commented Apr 4, 2015

Increment node reference count for nodes created in php_xpath_eval()

Increment node reference count for nodes created in php_xpath_eval()
@nikic
Copy link
Member

nikic commented Apr 4, 2015

I tested this patch against your test script (see https://bugs.php.net/bug.php?id=69373) and I'm still getting memory errors from valgrind.

Prevent double-free from write to nodeValue.

xmlNodeSetContentLen calls xmlFreeNode() on the node children. This results
in references to those children having pointers to free'ed memory. This
fix prevents the call to xmlFreeNode().
@ttoohey ttoohey closed this Apr 5, 2015
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.

None yet

2 participants