Permalink
Browse files

Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  - Fixed bug #62064 (memory leak in the XML Writer module)
  • Loading branch information...
2 parents 29a85d4 + 6d928fd commit 88275e547fb8c94a9fc23e057dd96f9fc19b3ede @felipensp felipensp committed May 18, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 ext/xmlwriter/php_xmlwriter.c
View
2 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;
}

0 comments on commit 88275e5

Please sign in to comment.