Skip to content

Commit 09d4037

Browse files
committed
JIT: Fixed possible memory leak
1 parent 983a4fc commit 09d4037

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,12 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
777777
default:
778778
zend_jit_illegal_string_offset(dim);
779779
undef_result_after_exception();
780+
if ((EG(opline_before_exception)+1)->opcode == ZEND_OP_DATA
781+
&& ((EG(opline_before_exception)+1)->op1_type & (IS_VAR|IS_TMP_VAR))) {
782+
zend_execute_data *execute_data = EG(current_execute_data);
783+
784+
zval_ptr_dtor_nogc(EX_VAR((EG(opline_before_exception)+1)->op1.var));
785+
}
780786
return NULL;
781787
}
782788

0 commit comments

Comments
 (0)