From: Xinchen Hui Date: Sun, 26 Feb 2012 14:56:26 +0000 (+0000) Subject: Improve fix for #61165, the previous one cause #43450 test failed X-Git-Tag: php-5.5.0alpha1~500 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1923ecfe2552851b4ed19cadcc78b1f957bf58ef;p=php Improve fix for #61165, the previous one cause #43450 test failed --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 4c0e0f6b2f..1c608a7a30 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -263,8 +263,7 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TS { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *obj; - ALLOC_ZVAL(obj); - MAKE_COPY_ZVAL(arg, obj); + MAKE_STD_ZVAL(obj); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *arg = obj; @@ -272,7 +271,7 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TS *p = Z_STRVAL_PP(arg); return SUCCESS; } - zval_ptr_dtor(&obj); + efree(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) {