Skip to content

Commit 22c9d19

Browse files
committed
Removed useless zval_ptr_dtor(return_value)
1 parent d90a5d2 commit 22c9d19

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

ext/filter/filter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,9 @@ static void php_filter_array_handler(zval *input, zval *op, zval *return_value,
676676
zval *tmp, *arg_elm;
677677

678678
if (!op) {
679-
zval_ptr_dtor(return_value);
680679
ZVAL_DUP(return_value, input);
681680
php_filter_call(return_value, FILTER_DEFAULT, NULL, 0, FILTER_REQUIRE_ARRAY);
682681
} else if (Z_TYPE_P(op) == IS_LONG) {
683-
zval_ptr_dtor(return_value);
684682
ZVAL_DUP(return_value, input);
685683
php_filter_call(return_value, Z_LVAL_P(op), NULL, 0, FILTER_REQUIRE_ARRAY);
686684
} else if (Z_TYPE_P(op) == IS_ARRAY) {

ext/imap/php_imap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,13 +3353,13 @@ PHP_FUNCTION(imap_bodystruct)
33533353
RETURN_FALSE;
33543354
}
33553355

3356-
object_init(return_value);
33573356

33583357
body=mail_body(imap_le_struct->imap_stream, msg, (unsigned char*)ZSTR_VAL(section));
33593358
if (body == NULL) {
3360-
zval_ptr_dtor(return_value);
33613359
RETURN_FALSE;
33623360
}
3361+
3362+
object_init(return_value);
33633363
if (body->type <= TYPEMAX) {
33643364
add_property_long(return_value, "type", body->type);
33653365
}

ext/spl/spl_directory.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,6 @@ static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char deli
21292129

21302130
php_fgetcsv(intern->u.file.stream, delimiter, enclosure, escape, buf_len, buf, &intern->u.file.current_zval);
21312131
if (return_value) {
2132-
zval_ptr_dtor(return_value);
21332132
value = &intern->u.file.current_zval;
21342133
ZVAL_COPY_DEREF(return_value, value);
21352134
}

0 commit comments

Comments
 (0)