summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2012-05-18 19:23:42 -0300
committerFelipe Pena <felipensp@gmail.com>2012-05-18 19:23:42 -0300
commit88275e547fb8c94a9fc23e057dd96f9fc19b3ede (patch)
tree2d5a170840c568a54b64affa876ef83c55eb95a8 /ext
parent29a85d49ae02d192f03243636b14845209c0ca0d (diff)
parent6d928fd26d27e00da4a6b812b231ca526ddecaac (diff)
downloadphp-git-88275e547fb8c94a9fc23e057dd96f9fc19b3ede.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: - Fixed bug #62064 (memory leak in the XML Writer module)
Diffstat (limited to 'ext')
-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;
}