1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00

plug multiple leaks

(you need to destroy the zval before changing its type manually)
This commit is contained in:
Antony Dovgal
2005-12-06 10:21:52 +00:00
parent f2a9649f03
commit 43f74ba5f1
2 changed files with 2 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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;
}