diff options
author | Arnaud Le Blanc <lbarnaud@php.net> | 2009-05-16 20:27:36 +0000 |
---|---|---|
committer | Arnaud Le Blanc <lbarnaud@php.net> | 2009-05-16 20:27:36 +0000 |
commit | fab1f0e75403c2752b0fbd991aedc3490842aa0c (patch) | |
tree | 832be5fb4ff9c4dc0efb1d717be25d6ac8104aea /main | |
parent | a2600facdddfbed954d6aacf8333cd8402a50e83 (diff) | |
download | php-git-fab1f0e75403c2752b0fbd991aedc3490842aa0c.tar.gz |
Fix warning when inner stream of a temp:// stream is closed before
the stream ifself
Diffstat (limited to 'main')
-rw-r--r-- | main/streams/memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index fd99782ccf..a44fba4c24 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -563,6 +563,7 @@ PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STR stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, mode & TEMP_STREAM_READONLY ? "rb" : "w+b"); stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; self->innerstream = php_stream_memory_create_rel(mode); + php_stream_auto_cleanup(self->innerstream); // do not warn if innerstream is GC'ed before stream ((php_stream_memory_data*)self->innerstream->abstract)->owner_ptr = &self->innerstream; return stream; |