From bba1ded0b2aeb12fb93c327c44a4694ae4538461 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 13 Jan 2004 16:02:56 +0000 Subject: Fix refcount on these return values to avoid a leak and allow object dtor's to be called. This in turn prevents a massive slow-down in CoUninitialize which would have to forcibly destroy the COM objects in request shutdown. --- ext/com_dotnet/com_handlers.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/com_dotnet/com_handlers.c') diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index f9f29e04d5..d4211b4dc1 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -37,6 +37,8 @@ static zval *com_property_read(zval *object, zval *member, zend_bool silent TSRM MAKE_STD_ZVAL(return_value); ZVAL_NULL(return_value); + return_value->refcount = 0; + return_value->is_ref = 0; obj = CDNO_FETCH(object); @@ -110,6 +112,8 @@ static zval *com_read_dimension(zval *object, zval *offset TSRMLS_DC) MAKE_STD_ZVAL(return_value); ZVAL_NULL(return_value); + return_value->refcount = 0; + return_value->is_ref = 0; obj = CDNO_FETCH(object); -- cgit v1.2.1