From: Xinchen Hui Date: Wed, 4 Mar 2015 04:08:54 +0000 (+0800) Subject: Fixed memleak X-Git-Tag: PRE_PHP7_EREG_MYSQL_REMOVALS~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6ba7966de04747fc25228e7954146a485c6e402;p=php Fixed memleak --- diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 969c5e131c..c463a68e84 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -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);