diff options
author | William M. Brack <wbrack@src.gnome.org> | 2007-08-23 12:58:13 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2007-08-23 12:58:13 +0000 |
commit | f179456d0f82225ef32196d4947a565bed1b59cb (patch) | |
tree | 6786bcb7fdff64194a0d95602b62f7e89b8cfd4d /xpath.c | |
parent | 3888f472631b7b6005aae57e7ea58b917253a2a8 (diff) | |
download | libxml2-f179456d0f82225ef32196d4947a565bed1b59cb.tar.gz |
fixed mlXPathCompOpEvalPositionalPredicate problem with object caching
* xpath.c: fixed mlXPathCompOpEvalPositionalPredicate problem
with object caching (bug #469410)
svn path=/trunk/; revision=3653
Diffstat (limited to 'xpath.c')
-rw-r--r-- | xpath.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -11706,8 +11706,15 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, valuePush(ctxt, contextObj); res = xmlXPathCompOpEvalToBoolean(ctxt, exprOp, 1); - if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) + if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { + xmlXPathObjectPtr tmp; + /* pop the result */ + tmp = valuePop(ctxt); + xmlXPathReleaseObject(xpctxt, tmp); + /* then pop off contextObj, which will be freed later */ + valuePop(ctxt); goto evaluation_error; + } if (res) pos++; |