summaryrefslogtreecommitdiffstats
path: root/third_party/libxml/src/xpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libxml/src/xpath.c')
-rw-r--r--third_party/libxml/src/xpath.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/libxml/src/xpath.c b/third_party/libxml/src/xpath.c
index b0a9c60..c7d69b5 100644
--- a/third_party/libxml/src/xpath.c
+++ b/third_party/libxml/src/xpath.c
@@ -11754,13 +11754,14 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr tmp;
/* pop the result if any */
tmp = valuePop(ctxt);
- if (tmp != contextObj)
+ while (tmp != contextObj) {
/*
* Free up the result
* then pop off contextObj, which will be freed later
*/
xmlXPathReleaseObject(xpctxt, tmp);
- valuePop(ctxt);
+ tmp = valuePop(ctxt);
+ }
goto evaluation_error;
}