[libxml2] Fix memory leak in xmlSAX2AttributeDecl



commit 92bce68c0d6741c9171e596619fc20dfa66e8cea
Author: David King <amigadave amigadave com>
Date:   Wed Jul 14 11:37:07 2021 +0100

    Fix memory leak in xmlSAX2AttributeDecl
    
    Found by Coverity.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1938806

 SAX2.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/SAX2.c b/SAX2.c
index 99019a98..8c0084c6 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -742,6 +742,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
         xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
             "SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n",
                       name, NULL);
+       xmlFree(name);
        xmlFreeEnumeration(tree);
        return;
     }


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