[libxslt] Fix memory leak in xsltNumberFormat



commit 15f148ee17f766bddcbfe5b4c0d5e75ed78c8650
Author: Albert Astals Cid <aacid kde org>
Date:   Wed Dec 2 00:39:44 2015 +0100

    Fix memory leak in xsltNumberFormat
    
    When tempformat is 1 we need to free data->format
    since it comes from xsltEvalAttrValueTemplate and otherwise it leaks

 libxslt/numbers.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libxslt/numbers.c b/libxslt/numbers.c
index 79cdec1..0884e4c 100644
--- a/libxslt/numbers.c
+++ b/libxslt/numbers.c
@@ -809,6 +809,7 @@ xsltNumberFormat(xsltTransformContextPtr ctxt,
 XSLT_NUMBER_FORMAT_END:
     if (tempformat == 1) {
        /* The format need to be recomputed each time */
+       xmlFree(data->format);
        data->format = NULL;
     }
     if (output != NULL)


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