com php-src: Fix memory leak in TSRM: ext/bz2/bz2.c
| From: | Stanislav Malyshev | Date: | Thu, 08 May 2014 08:00:34 +0000 |
| Subject: | com php-src: Fix memory leak in TSRM: ext/bz2/bz2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78197@lists.php.net to get a copy of this message | ||
Commit: 0cc18fdfbae82ab533d74e730bb89240fba535d4
Author: Stanislav Malyshev <stas@php.net> Wed, 7 May 2014 13:28:03 -0700
Parents: 8517001b259f1e8e540ee45cf15cf0312ca14098
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0cc18fdfbae82ab533d74e730bb89240fba535d4
Log:
Fix memory leak in TSRM
Changed paths:
M ext/bz2/bz2.c
Diff:
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 2692b22..908a78d 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -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) {