From: Ilia Alshanetsky Date: Mon, 3 Apr 2006 13:46:11 +0000 (+0000) Subject: Fixed an unlikely, but possible memory leak. X-Git-Tag: php-5.1.3RC3~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3edb5a8b6d5353d3d4fc4d69206832d79966c8ad;p=php Fixed an unlikely, but possible memory leak. --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0379d69875..7e78d1274c 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2397,6 +2397,7 @@ PHP_FUNCTION(register_shutdown_function) 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) { + efree(shutdown_function_entry.arguments); RETURN_FALSE; } @@ -2980,6 +2981,7 @@ PHP_FUNCTION(register_tick_function) 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) { + efree(tick_fe.arguments); RETURN_FALSE; }