From 28aca30c13debd1965890284901c115133fbebc4 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 20 May 2004 00:11:23 +0000 Subject: [PATCH] Free vars before calling E_ERROR. --- ext/pfpro/pfpro.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/pfpro/pfpro.c b/ext/pfpro/pfpro.c index 9b8005a9fe..a493ce3f0d 100644 --- a/ext/pfpro/pfpro.c +++ b/ext/pfpro/pfpro.c @@ -328,14 +328,14 @@ PHP_FUNCTION(pfpro_process) args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) { + efree(args); php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to read parameters in pfpro_process()"); - efree(args); RETURN_FALSE; } if (Z_TYPE_PP(args[0]) != IS_ARRAY) { + efree(args); php_error_docref(NULL TSRMLS_CC, E_ERROR, "First parameter to pfpro_process() must be an array"); - efree(args); RETURN_FALSE; } @@ -418,11 +418,11 @@ PHP_FUNCTION(pfpro_process) break; default: - php_error_docref(NULL TSRMLS_CC, E_ERROR, "pfpro_process() array keys must be strings or integers"); if (parmlist) { efree(parmlist); } efree(args); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "pfpro_process() array keys must be strings or integers"); RETURN_FALSE; } @@ -464,11 +464,11 @@ PHP_FUNCTION(pfpro_process) break; default: - php_error_docref(NULL TSRMLS_CC, E_ERROR, "pfpro_process() array values must be strings, ints or floats"); if (parmlist) { efree(parmlist); } efree(args); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "pfpro_process() array values must be strings, ints or floats"); RETURN_FALSE; } zend_hash_move_forward(target_hash); -- 2.50.1