]> granicus.if.org Git - php/commitdiff
MFH: Fixed an unlikely, but possible memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Apr 2006 13:46:48 +0000 (13:46 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Apr 2006 13:46:48 +0000 (13:46 +0000)
ext/standard/basic_functions.c

index 9f5b24fe8b63288e3989612b4bc95775cf4c47f3..922636e8a2e66866db327ea16a707c2a85cf9a25 100644 (file)
@@ -2219,6 +2219,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;
        }
        
@@ -2760,6 +2761,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;
        }