diff --git a/ext/standard/file.c b/ext/standard/file.c index 7e89e3b8e4e..ceb83af63ff 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -131,6 +131,7 @@ static ZEND_RSRC_DTOR_FUNC(file_context_dtor) { php_stream_context *context = (php_stream_context*)rsrc->ptr; zval_dtor(context->options); + context->options = NULL; php_stream_context_free(context); }