mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
Fix memory leak in TSRM
This commit is contained in:
parent
8517001b25
commit
0cc18fdfba
@ -229,6 +229,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
#endif
|
||||
|
||||
if (php_check_open_basedir(path_copy TSRMLS_CC)) {
|
||||
#ifdef VIRTUAL_DIR
|
||||
efree(path_copy);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -238,6 +241,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
if (opened_path && bz_file) {
|
||||
*opened_path = estrdup(path_copy);
|
||||
}
|
||||
#ifdef VIRTUAL_DIR
|
||||
efree(path_copy);
|
||||
#endif
|
||||
path_copy = NULL;
|
||||
|
||||
if (bz_file == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user