summaryrefslogtreecommitdiff
path: root/ext/xmlwriter/php_xmlwriter.c
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2012-05-18 19:34:39 -0300
committerFelipe Pena <felipensp@gmail.com>2012-05-18 19:34:39 -0300
commitf5e2315660cbaa0278bb90c2eb5a71a7bdc30405 (patch)
treeb344b41bacb7a8502fa18ac1deb0aa3e615b8811 /ext/xmlwriter/php_xmlwriter.c
parentebe16343a28d5a4cda89907611eda5870bd60456 (diff)
downloadphp-git-f5e2315660cbaa0278bb90c2eb5a71a7bdc30405.tar.gz
- Fixed bug #62064 (memory leak in the XML Writer module)
Diffstat (limited to 'ext/xmlwriter/php_xmlwriter.c')
-rw-r--r--ext/xmlwriter/php_xmlwriter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index 84be01d70a..0514b17ff6 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;
}