applied patch from Mark Vakoc Daniel
authorDaniel Veillard <veillard@src.gnome.org>
Wed, 10 Apr 2002 18:38:00 +0000 (18:38 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Wed, 10 Apr 2002 18:38:00 +0000 (18:38 +0000)
* libxslt/pattern.c: applied patch from Mark Vakoc
Daniel

ChangeLog
libxslt/pattern.c

index 46e9e04..85fa964 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Apr 10 20:35:54 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/pattern.c: applied patch from Mark Vakoc
+
 Fri Mar 29 18:28:23 CET 2002 Daniel Veillard <daniel@veillard.com>
 
        * tests/docs/Makefile.am tests/docs/bug-81.xml
index 52a4d30..6314ef9 100644 (file)
@@ -650,11 +650,15 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                                (void *) doc;
                            XSLT_RUNTIME_EXTRA_FREE(ctxt, select->lenExtra) =
                                (xmlFreeFunc) xmlXPathFreeObject;
-                       }
+                       } else
+                           list = newlist;
                    }
                    if ((list->nodesetval == NULL) ||
-                       (list->nodesetval->nodeNr <= 0))
+                       (list->nodesetval->nodeNr <= 0)) {
+                       if (nocache == 1)
+                           xmlXPathFreeObject(list);
                        return(0);
+                   }
                    /* TODO: store the index and use it for the scan */
                    if (index == 0) {
                        for (j = 0;j < list->nodesetval->nodeNr;j++) {