fix leaks; all tests pass
authorMichael Wallner <mike@php.net>
Mon, 15 Jun 2015 14:35:34 +0000 (16:35 +0200)
committerMichael Wallner <mike@php.net>
Mon, 15 Jun 2015 14:35:34 +0000 (16:35 +0200)
php_http_message.c
tests/propertyproxy001.phpt

index 75d7fe5396e9e4ab41c9125a040bbb559d4e4c30..a885cb58a69cfb87212855760755d5dac019575c 100644 (file)
@@ -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);
index 1001f8e5c3c981eccd6eb4a88a4d34091604fcc1..a1dc2d8ab88d74a9e9918d6db77243a3f972f6c5 100644 (file)
@@ -4,8 +4,6 @@ property proxy
 <?php
 include "skipif.inc";
 ?>
---XFAIL--
-TBD
 --FILE--
 <?php
 
@@ -57,7 +55,7 @@ array(3) {
   ["by1ref"]=>
   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]=>