Removed useless zval_ptr_dtor(return_value)

This commit is contained in:
Dmitry Stogov 2018-12-26 12:58:11 +03:00
parent d90a5d2e1a
commit 22c9d19144
3 changed files with 2 additions and 5 deletions

View file

@ -676,11 +676,9 @@ static void php_filter_array_handler(zval *input, zval *op, zval *return_value,
zval *tmp, *arg_elm;
if (!op) {
zval_ptr_dtor(return_value);
ZVAL_DUP(return_value, input);
php_filter_call(return_value, FILTER_DEFAULT, NULL, 0, FILTER_REQUIRE_ARRAY);
} else if (Z_TYPE_P(op) == IS_LONG) {
zval_ptr_dtor(return_value);
ZVAL_DUP(return_value, input);
php_filter_call(return_value, Z_LVAL_P(op), NULL, 0, FILTER_REQUIRE_ARRAY);
} else if (Z_TYPE_P(op) == IS_ARRAY) {

View file

@ -3353,13 +3353,13 @@ PHP_FUNCTION(imap_bodystruct)
RETURN_FALSE;
}
object_init(return_value);
body=mail_body(imap_le_struct->imap_stream, msg, (unsigned char*)ZSTR_VAL(section));
if (body == NULL) {
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
object_init(return_value);
if (body->type <= TYPEMAX) {
add_property_long(return_value, "type", body->type);
}

View file

@ -2129,7 +2129,6 @@ static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char deli
php_fgetcsv(intern->u.file.stream, delimiter, enclosure, escape, buf_len, buf, &intern->u.file.current_zval);
if (return_value) {
zval_ptr_dtor(return_value);
value = &intern->u.file.current_zval;
ZVAL_COPY_DEREF(return_value, value);
}