com php-src: - Fixed bug #62064 (memory leak in the XML Writer module): ext/xmlwriter/php_xmlwriter.c
| From: | Felipe Pena | Date: | Fri, 18 May 2012 22:34:39 +0000 |
| Subject: | com php-src: - Fixed bug #62064 (memory leak in the XML Writer module): ext/xmlwriter/php_xmlwriter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-69101@lists.php.net to get a copy of this message | ||
Commit: f5e2315660cbaa0278bb90c2eb5a71a7bdc30405
Author: Felipe Pena <felipensp@gmail.com> Fri, 18 May 2012 19:34:39 -0300
Parents: ebe16343a28d5a4cda89907611eda5870bd60456
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f5e2315660cbaa0278bb90c2eb5a71a7bdc30405
Log:
- Fixed bug #62064 (memory leak in the XML Writer module)
Bugs:
https://bugs.php.net/62064
Changed paths:
M ext/xmlwriter/php_xmlwriter.c
Diff:
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index 84be01d...0514b17 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -614,6 +614,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;
@@ -624,6 +625,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;
}