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

index 452c9ac3ea032a71f26eccdb64d83e5c88a4f353..c3a5b238b8564335ecc2cb2a14ded70c67eba012 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;
                }
        }