Skip to content

Commit 88275e5

Browse files
committed
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: - Fixed bug #62064 (memory leak in the XML Writer module)
2 parents 29a85d4 + 6d928fd commit 88275e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/xmlwriter/php_xmlwriter.c

+2
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i
614614
/* absolute file uris - libxml only supports localhost or empty host */
615615
if (strncasecmp(source, "file:///", 8) == 0) {
616616
if (source[sizeof("file:///") - 1] == '\0') {
617+
xmlFreeURI(uri);
617618
return NULL;
618619
}
619620
isFileUri = 1;
@@ -624,6 +625,7 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i
624625
#endif
625626
} else if (strncasecmp(source, "file://localhost/",17) == 0) {
626627
if (source[sizeof("file://localhost/") - 1] == '\0') {
628+
xmlFreeURI(uri);
627629
return NULL;
628630
}
629631

0 commit comments

Comments
 (0)