From: Sascha Schumann Date: Sun, 7 Jan 2001 10:32:06 +0000 (+0000) Subject: Use zval_ptr_dtor instead of zval_dtor/FREE_ZVAL pair. X-Git-Tag: php-4.0.5RC1~703 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24c49a21b9ecf0833a4816bd6d24acb105356ce4;p=php Use zval_ptr_dtor instead of zval_dtor/FREE_ZVAL pair. Submitted by: Andi Gutmans --- diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index caa5773abd..32fc050a6a 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -58,14 +58,12 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv) MAKE_STD_ZVAL(retval); if (call_user_function(EG(function_table), NULL, func, retval, argc, argv) == FAILURE) { - zval_dtor(retval); - FREE_ZVAL(retval); + zval_ptr_dtor(&retval); retval = NULL; } for (i = 0; i < argc; i++) { - zval_dtor(argv[i]); - FREE_ZVAL(argv[i]); + zval_ptr_dtor(&argv[i]); } return retval; @@ -84,8 +82,7 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv) if (retval) { \ convert_to_long(retval); \ ret = retval->value.lval; \ - zval_dtor(retval); \ - FREE_ZVAL(retval); \ + zval_ptr_dtor(&retval); \ } \ return ret @@ -133,8 +130,7 @@ PS_READ_FUNC(user) *vallen = retval->value.str.len; ret = SUCCESS; } - zval_dtor(retval); - FREE_ZVAL(retval); + zval_ptr_dtor(&retval); } return ret; diff --git a/ext/session/session.c b/ext/session/session.c index 5af87a142f..f0bdbdd75c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -477,8 +477,7 @@ PS_SERIALIZER_DECODE_FUNC(wddx) } } - zval_dtor(retval); - FREE_ZVAL(retval); + zval_ptr_dtor(&retval); return ret; }