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

index 0379d69875eeb67c18a014c6b5d3723916638068..7e78d1274c739cb617e620e8975300bb79219ca7 100644 (file)
@@ -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;
        }