Skip to content

Commit

Permalink
JIT: Fixed possible memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 22, 2021
1 parent 983a4fc commit 09d4037
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/opcache/jit/zend_jit_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,12 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
default:
zend_jit_illegal_string_offset(dim);
undef_result_after_exception();
if ((EG(opline_before_exception)+1)->opcode == ZEND_OP_DATA
&& ((EG(opline_before_exception)+1)->op1_type & (IS_VAR|IS_TMP_VAR))) {
zend_execute_data *execute_data = EG(current_execute_data);

zval_ptr_dtor_nogc(EX_VAR((EG(opline_before_exception)+1)->op1.var));
}
return NULL;
}

Expand Down

0 comments on commit 09d4037

Please sign in to comment.