mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
MFB51: Fixed an unlikely, but possible memory leak.
This commit is contained in:
parent
0b0fff07b2
commit
a24cb8773f
1 changed files with 2 additions and 0 deletions
|
@ -2350,6 +2350,7 @@ PHP_FUNCTION(register_shutdown_function)
|
||||||
shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
|
shutdown_function_entry.arguments = (zval **) safe_emalloc(sizeof(zval *), shutdown_function_entry.arg_count, 0);
|
||||||
|
|
||||||
if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
|
if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) {
|
||||||
|
efree(shutdown_function_entry.arguments);
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2915,6 +2916,7 @@ PHP_FUNCTION(register_tick_function)
|
||||||
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
|
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
|
||||||
|
|
||||||
if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
|
if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
|
||||||
|
efree(tick_fe.arguments);
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue