From: Arnaud Le Blanc Date: Sat, 16 May 2009 20:27:11 +0000 (+0000) Subject: Fix warning when inner stream of a temp:// stream is closed before X-Git-Tag: php-5.4.0alpha1~191^2~3645 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c6bd3eb6705e592100612270008cf498ec718b9;p=php Fix warning when inner stream of a temp:// stream is closed before the stream ifself --- diff --git a/main/streams/memory.c b/main/streams/memory.c index 2aab6f6f9f..6212b49f91 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;