[libxml2] Fix memory leak in xmlSchemaValAtomicType



commit 5eeb9d5fbb7147cd679d7bdc24aa6e25580a4f0f
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Oct 14 16:35:00 2019 +0200

    Fix memory leak in xmlSchemaValAtomicType
    
    Don't collapse anyUris twice.
    
    Closes #104.

 xmlschemastypes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 7503f905..e7764d90 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -2925,7 +2925,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                 if (*value != 0) {
                    xmlURIPtr uri;
                    xmlChar *tmpval, *cur;
-                   if (normOnTheFly) {
+                   if ((norm == NULL) && (normOnTheFly)) {
                        norm = xmlSchemaCollapseString(value);
                        if (norm != NULL)
                            value = norm;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]