com php-src: Use zval_ptr_dtor() instead of legac y zval_dtor(), to destroy unused values ret urned from PHP functions (they may be circular data
structures).: ext/interbase/php_ibase_udf .c ext/intl/uchar/uchar.c ext/soap/soap.c ext/stand ard/basic_functions.c
| From: | Dmitry Stogov | Date: | Thu, 05 Jul 2018 11:09:47 +0000 |
| Subject: | com php-src: Use zval_ptr_dtor() instead of legac y zval_dtor(), to destroy unused values ret urned from PHP functions (they may be circular data structures).: ext/interbase/php_ibase_udf .c ext/intl/uchar/uchar.c ext/soap/soap.c ext/stand ard/basic_functions.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102417@lists.php.net to get a copy of this message | ||
Commit: 83f6f8563cf776de2267124e0ebe8b6c0e9043a8
Author: Dmitry Stogov <dmitry@zend.com> Thu, 5 Jul 2018 14:09:47 +0300
Parents: 273e194df579d4ae9ea848a1b2ee91e9f61fc141
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=83f6f8563cf776de2267124e0ebe8b6c0e9043a8
Log:
Use zval_ptr_dtor() instead of legacy zval_dtor(), to destroy unused values returned from PHP
functions (they may be circular data structures).
Changed paths:
M ext/interbase/php_ibase_udf.c
M ext/intl/uchar/uchar.c
M ext/soap/soap.c
M ext/standard/basic_functions.c
Diff:
diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c
index b8bb603..e77f3c6 100644
--- a/ext/interbase/php_ibase_udf.c
+++ b/ext/interbase/php_ibase_udf.c
@@ -334,7 +334,7 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
break;
}
- zval_dtor(&return_value);
+ zval_ptr_dtor(&return_value);
return;
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c
index b01018d..54d2082 100644
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -205,10 +205,10 @@ static UBool enumCharType_callback(enumCharType_data *context,
if (zend_call_function(&context->fci, &context->fci_cache) == FAILURE) {
intl_error_set_code(NULL, U_INTERNAL_PROGRAM_ERROR);
intl_errors_set_custom_msg(NULL, "enumCharTypes callback failed", 0);
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
return 0;
}
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
return 1;
}
IC_METHOD(enumCharTypes) {
@@ -319,11 +319,11 @@ static UBool enumCharNames_callback(enumCharNames_data *context,
if (zend_call_function(&context->fci, &context->fci_cache) == FAILURE) {
intl_error_set_code(NULL, U_INTERNAL_PROGRAM_ERROR);
intl_error_set_custom_msg(NULL, "enumCharNames callback failed", 0);
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
zval_ptr_dtor_str(&args[2]);
return 0;
}
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
zval_ptr_dtor_str(&args[2]);
return 1;
}
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 82a4f36..11afe47 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap..c
@@ -1540,7 +1540,7 @@ PHP_METHOD(SoapServer, handle)
zval_ptr_dtor(¶m);
zval_ptr_dtor_str(&readfile);
- zval_dtor(&readfile_ret);
+ zval_ptr_dtor(&readfile_ret);
SOAP_SERVER_END_CODE();
return;
@@ -1699,12 +1699,12 @@ PHP_METHOD(SoapServer, handle)
php_output_discard();
_soap_server_exception(service, function, getThis());
zval_ptr_dtor_str(&constructor);
- zval_dtor(&c_ret);
+ zval_ptr_dtor(&c_ret);
zval_ptr_dtor(&tmp_soap);
goto fail;
}
zval_ptr_dtor_str(&constructor);
- zval_dtor(&c_ret);
+ zval_ptr_dtor(&c_ret);
} else {
int class_name_len = ZSTR_LEN(service->soap_class.ce->name);
char *class_name = emalloc(class_name_len+1);
@@ -1722,14 +1722,14 @@ PHP_METHOD(SoapServer, handle)
php_output_discard();
_soap_server_exception(service, function, getThis());
zval_ptr_dtor_str(&constructor);
- zval_dtor(&c_ret);
+ zval_ptr_dtor(&c_ret);
efree(class_name);
zval_ptr_dtor(&tmp_soap);
goto fail;
}
zval_ptr_dtor_str(&constructor);
- zval_dtor(&c_ret);
+ zval_ptr_dtor(&c_ret);
}
efree(class_name);
}
@@ -1953,7 +1953,7 @@ fail:
efree(h->parameters);
}
zval_ptr_dtor_str(&h->function_name);
- zval_dtor(&h->retval);
+ zval_ptr_dtor(&h->retval);
efree(h);
}
service->soap_headers_ptr = NULL;
@@ -2683,7 +2683,7 @@ static void do_soap_call(zend_execute_data *execute_data,
encode_finish();
}
- zval_dtor(&response);
+ zval_ptr_dtor(&response);
} else {
smart_str error = {0};
@@ -2728,7 +2728,7 @@ static void do_soap_call(zend_execute_data *execute_data,
encode_finish();
}
- zval_dtor(&response);
+ zval_ptr_dtor(&response);
}
}
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 7424c24..b30fec0 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5054,7 +5054,7 @@ static int user_shutdown_function_call(zval *zv) /* {{{ */
shutdown_function_entry->arg_count - 1,
shutdown_function_entry->arguments + 1) == SUCCESS)
{
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
}
return 0;
}
@@ -5075,7 +5075,7 @@ static void user_tick_function_call(user_tick_function_entry *tick_fe) /* {{{
*/
tick_fe->arg_count - 1,
tick_fe->arguments + 1
) == SUCCESS) {
- zval_dtor(&retval);
+ zval_ptr_dtor(&retval);
} else {
zval *obj, *method;