diff options
Diffstat (limited to 'libexslt/common.c')
-rw-r--r-- | libexslt/common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libexslt/common.c b/libexslt/common.c index ba57fa5b..77f352e5 100644 --- a/libexslt/common.c +++ b/libexslt/common.c @@ -60,6 +60,12 @@ exsltNodeSetFunction (xmlXPathParserContextPtr ctxt, int nargs) { xsltTransformError(tctxt, NULL, tctxt->inst, "exsltNodeSetFunction: Failed to create a node set object.\n"); tctxt->state = XSLT_STATE_STOPPED; + } else { + /* + * Mark it as a function result in order to avoid garbage + * collecting of tree fragments + */ + xsltExtensionInstructionResultRegister(tctxt, obj); } if (strval != NULL) xmlFree (strval); |