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);
}
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 */
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) {
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);
}