Skip to content

Commit dd9d0a9

Browse files
committed
Fixed false alarm about tmp_name maybe unitialized
1 parent 7977cd1 commit dd9d0a9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Zend/zend_execute.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,7 @@ static zend_never_inline void zend_assign_to_property_reference_var_var(zval *co
28282828
}
28292829

28302830
static zend_never_inline int zend_fetch_static_property_address_ex(zval **retval, zend_property_info **prop_info, uint32_t cache_slot, int fetch_type OPLINE_DC EXECUTE_DATA_DC) {
2831-
zend_string *name, *tmp_name;
2831+
zend_string *name;
28322832
zend_class_entry *ce;
28332833
zend_property_info *property_info;
28342834

@@ -2868,7 +2868,9 @@ static zend_never_inline int zend_fetch_static_property_address_ex(zval **retval
28682868

28692869
if (EXPECTED(op1_type == IS_CONST)) {
28702870
name = Z_STR_P(RT_CONSTANT(opline, opline->op1));
2871+
*retval = zend_std_get_static_property_with_info(ce, name, fetch_type, &property_info);
28712872
} else {
2873+
zend_string *tmp_name;
28722874
zval *varname = get_zval_ptr_undef(opline->op1_type, opline->op1, BP_VAR_R);
28732875
if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
28742876
name = Z_STR_P(varname);
@@ -2879,14 +2881,13 @@ static zend_never_inline int zend_fetch_static_property_address_ex(zval **retval
28792881
}
28802882
name = zval_get_tmp_string(varname, &tmp_name);
28812883
}
2882-
}
2884+
*retval = zend_std_get_static_property_with_info(ce, name, fetch_type, &property_info);
28832885

2884-
*retval = zend_std_get_static_property_with_info(ce, name, fetch_type, &property_info);
2886+
if (UNEXPECTED(op1_type != IS_CONST)) {
2887+
zend_tmp_string_release(tmp_name);
28852888

2886-
if (UNEXPECTED(op1_type != IS_CONST)) {
2887-
zend_tmp_string_release(tmp_name);
2888-
2889-
FREE_OP(op1_type, opline->op1.var);
2889+
FREE_OP(op1_type, opline->op1.var);
2890+
}
28902891
}
28912892

28922893
if (UNEXPECTED(*retval == NULL)) {

0 commit comments

Comments
 (0)