diff options
author | Antony Dovgal <tony2001@php.net> | 2005-12-06 10:21:52 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-12-06 10:21:52 +0000 |
commit | 43f74ba5f10278c8a4b69c4e06ac8551ca0ec02b (patch) | |
tree | 9777f910464e94cd8f1021863767c9f269d3d493 | |
parent | f2a9649f03f507910e43734a8db818aca37da240 (diff) | |
download | php-git-43f74ba5f10278c8a4b69c4e06ac8551ca0ec02b.tar.gz |
plug multiple leaks
(you need to destroy the zval before changing its type manually)
-rw-r--r-- | ext/filter/callback_filter.c | 1 | ||||
-rw-r--r-- | ext/filter/sanitizing_filters.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index f2cbc35f9b..fe5c1fb39b 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -28,6 +28,7 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL) if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, &name)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback"); efree(name); + zval_dtor(value); Z_TYPE_P(value) = IS_NULL; return; } diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index 1b5b920d6d..992d00a303 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -180,6 +180,7 @@ void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL) Z_STRLEN_P(value) = new_len; if (new_len == 0) { + zval_dtor(value); Z_TYPE_P(value) = IS_NULL; return; } |