summaryrefslogtreecommitdiff
path: root/ext/bz2
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-04-08 13:29:42 +0300
committerDmitry Stogov <dmitry@zend.com>2015-04-08 13:29:42 +0300
commit4d9a1883aa764e502990488d2e8b9c978be6fbd2 (patch)
tree1058bb04ebf8266a316c6449132e7cda7d0ce54b /ext/bz2
parentfa795b05530c4ccd33ff63f23903bf4b458dc491 (diff)
downloadphp-git-4d9a1883aa764e502990488d2e8b9c978be6fbd2.tar.gz
Fixed bug #68887 (resources are not freed correctly)
Diffstat (limited to 'ext/bz2')
-rw-r--r--ext/bz2/bz2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 921fc9954b..d4175c724a 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -226,6 +226,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open_from_BZFILE(BZFILE *bz,
self = emalloc(sizeof(*self));
self->stream = innerstream;
+ if (innerstream) {
+ GC_REFCOUNT(innerstream->res)++;
+ }
self->bz_file = bz;
return php_stream_alloc_rel(&php_stream_bz2io_ops, self, 0, mode);