equal
deleted
inserted
replaced
1 --- libxml2-2.7.6/xpath.c.orig Mon Jun 6 11:10:14 2011 |
|
2 +++ libxml2-2.7.6/xpath.c Mon Jun 6 11:11:04 2011 |
|
3 @@ -11739,11 +11739,16 @@ |
|
4 |
|
5 if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { |
|
6 xmlXPathObjectPtr tmp; |
|
7 - /* pop the result */ |
|
8 + /* pop the result if any */ |
|
9 tmp = valuePop(ctxt); |
|
10 - xmlXPathReleaseObject(xpctxt, tmp); |
|
11 - /* then pop off contextObj, which will be freed later */ |
|
12 - valuePop(ctxt); |
|
13 + if (tmp != contextObj) { |
|
14 + /* |
|
15 + * Free up the result |
|
16 + * then pop off contextObj, which will be freed later |
|
17 + */ |
|
18 + xmlXPathReleaseObject(xpctxt, tmp); |
|
19 + valuePop(ctxt); |
|
20 + } |
|
21 goto evaluation_error; |
|
22 } |
|
23 |
|