From 6d928fd26d27e00da4a6b812b231ca526ddecaac Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 18 May 2012 19:23:29 -0300 Subject: - Fixed bug #62064 (memory leak in the XML Writer module) --- ext/xmlwriter/php_xmlwriter.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/xmlwriter') diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 4ea76dad51..588ca4bf3a 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -616,6 +616,7 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i /* absolute file uris - libxml only supports localhost or empty host */ if (strncasecmp(source, "file:///", 8) == 0) { if (source[sizeof("file:///") - 1] == '\0') { + xmlFreeURI(uri); return NULL; } isFileUri = 1; @@ -626,6 +627,7 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i #endif } else if (strncasecmp(source, "file://localhost/",17) == 0) { if (source[sizeof("file://localhost/") - 1] == '\0') { + xmlFreeURI(uri); return NULL; } -- cgit v1.2.1