From: Michael Wallner Date: Mon, 15 Jun 2015 14:35:34 +0000 (+0200) Subject: fix leaks; all tests pass X-Git-Tag: RELEASE_3_0_0_RC1~44 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0347914eda73287d017c6512dfe870382312299a;p=m6w6%2Fext-http fix leaks; all tests pass --- diff --git a/php_http_message.c b/php_http_message.c index 75d7fe5..a885cb5 100644 --- a/php_http_message.c +++ b/php_http_message.c @@ -872,7 +872,14 @@ static zval *php_http_message_object_read_prop(zval *object, zval *member, int t ZVAL_COPY_VALUE(return_value, tmp); } } else { - return_value = php_property_proxy_zval(object, member_name); + php_property_proxy_t *proxy; + php_property_proxy_object_t *proxy_obj; + + proxy = php_property_proxy_init(object, member_name); + proxy_obj = php_property_proxy_object_new_ex(NULL, proxy); + + ZVAL_OBJ(tmp, &proxy_obj->zo); + return tmp; } zend_string_release(member_name); diff --git a/tests/propertyproxy001.phpt b/tests/propertyproxy001.phpt index 1001f8e..a1dc2d8 100644 --- a/tests/propertyproxy001.phpt +++ b/tests/propertyproxy001.phpt @@ -4,8 +4,6 @@ property proxy ---XFAIL-- -TBD --FILE-- int(2) ["by2ref"]=> - &int(1) + int(1) } array(4) { ["bykey"]=> @@ -65,9 +63,9 @@ array(4) { ["by1ref"]=> int(2) ["by2ref"]=> - &int(1) + int(1) ["byXref"]=> - &int(2) + int(2) } array(5) { ["bykey"]=> @@ -75,9 +73,9 @@ array(5) { ["by1ref"]=> int(2) ["by2ref"]=> - &int(1) + int(1) ["byXref"]=> - &int(2) + int(2) ["bynext"]=> array(3) { [0]=>