summaryrefslogtreecommitdiff
path: root/ext/bz2
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-05-08 01:00:51 -0700
committerStanislav Malyshev <stas@php.net>2014-05-08 01:00:51 -0700
commita444900c8df384f51bdfe5a8fe867a2a40978fe7 (patch)
treefd855333a36d8ff20d0c8f7edad6ed2b48c35923 /ext/bz2
parent8e2d396b52de88f299882b872a3603a4c37644a5 (diff)
parent0cc18fdfbae82ab533d74e730bb89240fba535d4 (diff)
downloadphp-git-a444900c8df384f51bdfe5a8fe867a2a40978fe7.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix memory leak in TSRM
Diffstat (limited to 'ext/bz2')
-rw-r--r--ext/bz2/bz2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 2692b22586..908a78df0e 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) {