From: Marcus Boerger Date: Sat, 14 Jun 2003 19:30:42 +0000 (+0000) Subject: Fix ZTS mode (hopefully all is working fine now again) X-Git-Tag: RELEASE_1_0_2~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f304458bdb78d19bd5da94a04abafc2602d60cdd;p=php Fix ZTS mode (hopefully all is working fine now again) --- diff --git a/ext/standard/file.c b/ext/standard/file.c index ceb83af63f..4b46bd4308 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -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); } diff --git a/main/streams/streams.c b/main/streams/streams.c index b396a260b2..f35b401b0d 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -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); }