dmitry Tue May 8 12:08:18 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/main/streams streams.c
/php-src/ext/zlib zlib_fopen_wrapper.c
Log:
Fixed bug #41304 (compress.zlib temp files left)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.687&r2=1.2027.2.547.2.688&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.687 php-src/NEWS:1.2027.2.547.2.688
--- php-src/NEWS:1.2027.2.547.2.687 Mon May 7 14:54:36 2007
+++ php-src/NEWS Tue May 8 12:08:17 2007
@@ -7,6 +7,7 @@
(Ilia)
- Fixed altering $this via argument named "this". (Dmitry)
- Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
+- Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
default post handler). (Ilia)
- Fixed gd build when used with freetype 1.x (Pierre, Tony)
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.12&r2=1.82.2.6.2.13&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.82.2.6.2.12
php-src/main/streams/streams.c:1.82.2.6.2.13
--- php-src/main/streams/streams.c:1.82.2.6.2.12 Sat Mar 3 19:01:34 2007
+++ php-src/main/streams/streams.c Tue May 8 12:08:17 2007
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.82.2.6.2.12 2007/03/03 19:01:34 helly Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.13 2007/05/08 12:08:17 dmitry Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1809,6 +1809,9 @@
case PHP_STREAM_UNCHANGED:
return stream;
case PHP_STREAM_RELEASED:
+ if (newstream->orig_path) {
+ pefree(newstream->orig_path,
persistent);
+ }
newstream->orig_path = pestrdup(path,
persistent);
return newstream;
default:
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib_fopen_wrapper.c?r1=1.46.2.1.2.3&r2=1.46.2.1.2.4&diff_format=u
Index: php-src/ext/zlib/zlib_fopen_wrapper.c
diff -u php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1.2.3
php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1.2.4
--- php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1.2.3 Thu Apr 26 12:52:58 2007
+++ php-src/ext/zlib/zlib_fopen_wrapper.c Tue May 8 12:08:17 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1.2.3 2007/04/26 12:52:58 dmitry Exp $ */
+/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1.2.4 2007/05/08 12:08:17 dmitry Exp $ */
#define _GNU_SOURCE
@@ -76,7 +76,7 @@
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 @@
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);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php