Permalink
Browse files

- Fixed bug #62064 (memory leak in the XML Writer module)

  • Loading branch information...
1 parent ebe1634 commit f5e2315660cbaa0278bb90c2eb5a71a7bdc30405 @felipensp felipensp committed May 18, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 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 f5e2315

Please sign in to comment.