Skip to content

Commit 169a6c6

Browse files
authored
zend_execute: Remove useless refcounting in get_deprecation_suffix_from_attribute() (#18229)
1 parent 5544be7 commit 169a6c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Zend/zend_execute.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,14 +1850,14 @@ ZEND_COLD static zend_result ZEND_FASTCALL get_deprecation_suffix_from_attribute
18501850
z = zend_read_property_ex(zend_ce_deprecated, Z_OBJ_P(&obj), ZSTR_KNOWN(ZEND_STR_MESSAGE), false, NULL);
18511851
ZEND_ASSERT(z != &EG(uninitialized_zval));
18521852
if (Z_TYPE_P(z) == IS_STRING) {
1853-
message = zend_string_copy(Z_STR_P(z));
1853+
message = Z_STR_P(z);
18541854
}
18551855

18561856
/* Extract the $since property. */
18571857
z = zend_read_property_ex(zend_ce_deprecated, Z_OBJ_P(&obj), ZSTR_KNOWN(ZEND_STR_SINCE), false, NULL);
18581858
ZEND_ASSERT(z != &EG(uninitialized_zval));
18591859
if (Z_TYPE_P(z) == IS_STRING) {
1860-
since = zend_string_copy(Z_STR_P(z));
1860+
since = Z_STR_P(z);
18611861
}
18621862

18631863
/* Construct the suffix. */
@@ -1874,8 +1874,6 @@ ZEND_COLD static zend_result ZEND_FASTCALL get_deprecation_suffix_from_attribute
18741874

18751875
out:
18761876

1877-
zend_string_release(since);
1878-
zend_string_release(message);
18791877
zval_ptr_dtor(&obj);
18801878

18811879
return result;

0 commit comments

Comments
 (0)