[LIBXSLT] Update to version 1.1.32. CORE-14291
[reactos.git] / dll / 3rdparty / libxslt / keys.c
index dc1ab6d..9170538 100644 (file)
@@ -384,10 +384,13 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name,
        prev->next = key;
     }
     key->next = NULL;
+    key = NULL;
 
 error:
     if (pattern != NULL)
        xmlFree(pattern);
+    if (key != NULL)
+        xsltFreeKeyDef(key);
     return(0);
 }
 
@@ -741,6 +744,7 @@ fprintf(stderr, "xsltInitCtxtKey %s : %d\n", keyDef->name, ctxt->keyInitLevel);
        cur = matchList->nodeTab[i];
        if (! IS_XSLT_REAL_NODE(cur))
            continue;
+        ctxt->node = cur;
        xpctxt->node = cur;
        /*
        * Process the 'use' of the xsl:key.