diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-05-20 00:11:33 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-05-20 00:11:33 +0000 |
commit | 900eaa32f346d50b38503535d27eb07ccedf3912 (patch) | |
tree | 42b4936d4cddc41c4fcc34fc4b1a1de73aa2a481 | |
parent | 8635889231ae3515bc260d68108b9cab4c7def29 (diff) | |
download | php-git-900eaa32f346d50b38503535d27eb07ccedf3912.tar.gz |
MFH: Free vars before calling E_ERROR.
-rw-r--r-- | ext/pfpro/pfpro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pfpro/pfpro.c b/ext/pfpro/pfpro.c index 1ad1b7a3db..cc931b82c7 100644 --- a/ext/pfpro/pfpro.c +++ b/ext/pfpro/pfpro.c @@ -328,14 +328,14 @@ PHP_FUNCTION(pfpro_process) args = (zval ***) emalloc(sizeof(zval **) * ZEND_NUM_ARGS()); if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) { + efree(args); php_error(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(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(E_ERROR, "pfpro_process() array keys must be strings or integers"); if (parmlist) { efree(parmlist); } efree(args); + php_error(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(E_ERROR, "pfpro_process() array values must be strings, ints or floats"); if (parmlist) { efree(parmlist); } efree(args); + php_error(E_ERROR, "pfpro_process() array values must be strings, ints or floats"); RETURN_FALSE; } zend_hash_move_forward(target_hash); |