]> granicus.if.org Git - php/commitdiff
Fix ZTS mode (hopefully all is working fine now again)
authorMarcus Boerger <helly@php.net>
Sat, 14 Jun 2003 19:30:42 +0000 (19:30 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 14 Jun 2003 19:30:42 +0000 (19:30 +0000)
ext/standard/file.c
main/streams/streams.c

index ceb83af63ff95c4a2fc8e505f98942da26f27611..4b46bd43080d909a0cfb1929b9f24b08bcd96d37 100644 (file)
@@ -130,8 +130,10 @@ PHPAPI int php_le_stream_context(void)
 static ZEND_RSRC_DTOR_FUNC(file_context_dtor)
 {
        php_stream_context *context = (php_stream_context*)rsrc->ptr;
-       zval_dtor(context->options);
-       context->options = NULL;
+       if (context->options) {
+               zval_ptr_dtor(&context->options);
+               context->options = NULL;
+       }
        php_stream_context_free(context);
 }
 
index b396a260b22df52a1102b59ca0fea00902f83752..f35b401b0d21bd1c212c019d7315cea665d8d3db 100755 (executable)
@@ -413,7 +413,7 @@ static void php_stream_fill_read_buffer(php_stream *stream, size_t size TSRMLS_D
                        size_t justread = 0;
                        int flags;
                        php_stream_bucket *bucket;
-                       php_stream_filter_status_t status;
+                       php_stream_filter_status_t status = PSFS_ERR_FATAL;
                        php_stream_filter *filter;
 
                        /* read a chunk into a bucket */
@@ -893,7 +893,7 @@ static size_t _php_stream_write_filtered(php_stream *stream, const char *buf, si
        php_stream_bucket *bucket;
        php_stream_bucket_brigade brig_in = { NULL, NULL }, brig_out = { NULL, NULL };
        php_stream_bucket_brigade *brig_inp = &brig_in, *brig_outp = &brig_out, *brig_swap;
-       php_stream_filter_status_t status;
+       php_stream_filter_status_t status = PSFS_ERR_FATAL;
        php_stream_filter *filter;
 
        if (buf) {
@@ -1618,7 +1618,10 @@ PHPAPI void php_stream_notification_notify(php_stream_context *context, int noti
 
 PHPAPI void php_stream_context_free(php_stream_context *context)
 {
-       zval_ptr_dtor(&context->options);
+       if (context->options) {
+               zval_ptr_dtor(&context->options);
+               context->options = NULL;
+       }
        efree(context);
 }