diff options
| author | Dmitry Stogov <dmitry@php.net> | 2007-05-08 12:08:17 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2007-05-08 12:08:17 +0000 |
| commit | eec0b67cd834b7040e58a4a5c3bf39fa2fdcc318 (patch) | |
| tree | a6b1a72dd33ca41da28060f061c67add2350f7e3 /ext/zlib | |
| parent | 420352d8b5320730689ac3f3772c372c78af3a74 (diff) | |
| download | php-git-eec0b67cd834b7040e58a4a5c3bf39fa2fdcc318.tar.gz | |
Fixed bug #41304 (compress.zlib temp files left)
Diffstat (limited to 'ext/zlib')
| -rw-r--r-- | ext/zlib/zlib_fopen_wrapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index 5e45edc31f..bab79b9740 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -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_free(self->stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PRESERVE_HANDLE); + php_stream_close(self->stream); self->stream = NULL; } } @@ -130,7 +130,7 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod int fd; if (SUCCESS == php_stream_cast(innerstream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) { - self->gz_file = gzdopen(fd, mode); + self->gz_file = gzdopen(dup(fd), mode); self->stream = innerstream; if (self->gz_file) { stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode); |
