]> granicus.if.org Git - php/commitdiff
Fixed memleak
authorXinchen Hui <laruence@php.net>
Wed, 4 Mar 2015 04:08:54 +0000 (12:08 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 4 Mar 2015 04:08:54 +0000 (12:08 +0800)
ext/bz2/bz2.c

index 969c5e131c971c81dae35b6a355e275b4600de61..c463a68e8459703707c50f6eba85b02214f5062b 100644 (file)
@@ -269,6 +269,10 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
                *opened_path = zend_string_init(path_copy, strlen(path_copy), 0);
        }
 
+#ifdef VIRTUAL_DIR
+               efree(path_copy);
+#endif
+
        if (bz_file == NULL) {
                /* that didn't work, so try and get something from the network/wrapper */
                stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);