summaryrefslogtreecommitdiff
path: root/main/streams/streams.c
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-03-17 19:37:30 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-03-17 19:37:30 +0000
commitef19fba2d59bc0e7875342d01cd513ae7f4c5d5e (patch)
tree058d63e2ffa0852058cc8a0ee2348e752f58d026 /main/streams/streams.c
parenta07759a01354b88a5807a023127da81dc1bc5ac9 (diff)
downloadphp-git-ef19fba2d59bc0e7875342d01cd513ae7f4c5d5e.tar.gz
- Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition for deleting the context was too broad) and so prevents segfaults in new circumstances (where the inhibition was not broad enough).
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-xmain/streams/streams.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c
index edcf0fb025..639ea075a0 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -344,7 +344,7 @@ PHPAPI int _php_stream_free(php_stream *stream, int close_options TSRMLS_DC) /*
/* on an resource list destruction, the context, another resource, may have
* already been freed (if it was created after the stream resource), so
* don't reference it */
- if (!(close_options & PHP_STREAM_FREE_RSRC_DTOR)) {
+ if (EG(active)) {
context = stream->context;
}