]> granicus.if.org Git - php/commitdiff
Prevent double close() of the same file handle
authorDmitry Stogov <dmitry@php.net>
Thu, 26 Apr 2007 12:52:58 +0000 (12:52 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 26 Apr 2007 12:52:58 +0000 (12:52 +0000)
ext/zlib/zlib_fopen_wrapper.c

index 64bee4928e172e63116d5fb6c86eddb28b137766..5e45edc31f80f83a6c7085c9bd9a7b2a4dc1b8c9 100644 (file)
@@ -76,7 +76,7 @@ static int php_gziop_close(php_stream *stream, int close_handle TSRMLS_DC)
                        self->gz_file = NULL;
                }
                if (self->stream) {
-                       php_stream_close(self->stream);
+                       php_stream_free(self->stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PRESERVE_HANDLE);
                        self->stream = NULL;
                }
        }