]> granicus.if.org Git - php/commitdiff
plug leaks that in the previous patch
authorNuno Lopes <nlopess@php.net>
Sat, 16 Sep 2006 18:18:55 +0000 (18:18 +0000)
committerNuno Lopes <nlopess@php.net>
Sat, 16 Sep 2006 18:18:55 +0000 (18:18 +0000)
ext/xmlreader/php_xmlreader.c
ext/xmlwriter/php_xmlwriter.c

index d5eca3d1670e4289f21c3436ec0ae3e5c6be8c59..fec0fa70a17ba0ec95bc0cffd5c7f1e3ec4db0ec 100644 (file)
@@ -261,6 +261,7 @@ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int reso
 
        if ((uri->scheme == NULL || isFileUri)) {
                if (!VCWD_REALPATH(source, resolved_path) && !expand_filepath(source, resolved_path TSRMLS_CC)) {
+                       xmlFreeURI(uri);
                        return NULL;
                }
                file_dest = resolved_path;
index 6baa512046c2e1739dc1948564bc8bfc78be3c88..ddb35df8e00bcd91ec660bc2a0cc3293d55710d6 100644 (file)
@@ -273,6 +273,7 @@ char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int reso
 
        if ((uri->scheme == NULL || isFileUri)) {
                if (!VCWD_REALPATH(source, resolved_path) && !expand_filepath(source, resolved_path TSRMLS_CC)) {
+                       xmlFreeURI(uri);
                        return NULL;
                }
                file_dest = resolved_path;