From: Felipe Pena Date: Fri, 18 May 2012 22:23:29 +0000 (-0300) Subject: - Fixed bug #62064 (memory leak in the XML Writer module) X-Git-Tag: php-5.4.4RC2~61^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d928fd26d27e00da4a6b812b231ca526ddecaac;p=php - Fixed bug #62064 (memory leak in the XML Writer module) --- 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; }