Skip to content

Commit 1644af2

Browse files
authored
zend_builtin_functions: Do not allocate to store name of FLF when fetching backtrace (#19842)
1 parent 685e4df commit 1644af2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,8 +1991,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
19911991
}
19921992
stack_frame = zend_new_array(8);
19931993
zend_hash_real_init_mixed(stack_frame);
1994-
zend_string *name = func->common.function_name;
1995-
ZVAL_STRINGL(&tmp, ZSTR_VAL(name), ZSTR_LEN(name));
1994+
ZVAL_STR_COPY(&tmp, func->common.function_name);
19961995
_zend_hash_append_ex(stack_frame, ZSTR_KNOWN(ZEND_STR_FUNCTION), &tmp, 1);
19971996
/* Steal file and line from the previous frame. */
19981997
if (call->func && ZEND_USER_CODE(call->func->common.type)) {

0 commit comments

Comments
 (0)