Fixed memory leak

This commit is contained in:
Dmitry Stogov 2020-09-09 11:09:20 +03:00
parent e9d1893f15
commit c5b42be40e
2 changed files with 22 additions and 0 deletions

View file

@ -6274,6 +6274,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
} }
|9: |9:
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
return 1; return 1;
} }

View file

@ -0,0 +1,21 @@
--TEST--
JIT ASSIGN_DIM_OP: 001
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$x = "a";
$a[$x . "b"] = 0;
$a[$x . "b"] += 2;
var_dump($a);
?>
--EXPECT--
array(1) {
["ab"]=>
int(2)
}