[libxml2] Fix memory leak in pattern error path



commit 1f131f1133e1441ea159204d606fb4bbc394e14b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed May 24 16:36:33 2017 +0200

    Fix memory leak in pattern error path
    
    Found with libFuzzer and ASan.

 pattern.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/pattern.c b/pattern.c
index 33dee3a..0eb8d81 100644
--- a/pattern.c
+++ b/pattern.c
@@ -969,6 +969,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
                ERROR5(NULL, NULL, NULL,
                    "xmlCompileAttributeTest : no namespace bound to prefix %s\n",
                    prefix);
+               XML_PAT_FREE_STRING(ctxt, prefix);
                ctxt->error = 1;
                goto error;
            }


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