summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/block_pass.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-04-27 17:01:49 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-04-27 17:02:01 +0200
commit2c602be7c85bf41c0aa7cd2b250b39bdac03a960 (patch)
tree59124fee850324f3f671b984c3c3aa3a5f3a7e40 /ext/opcache/Optimizer/block_pass.c
parent972c4869a75eb3c5655f50c4d630160a6df4ee15 (diff)
parent279ba58edbd0454d7e534e223e3538a2b0b5ff9b (diff)
downloadphp-git-2c602be7c85bf41c0aa7cd2b250b39bdac03a960.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
Diffstat (limited to 'ext/opcache/Optimizer/block_pass.c')
-rw-r--r--ext/opcache/Optimizer/block_pass.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 84d574a72e..e65ae31803 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1020,6 +1020,11 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array)
}
if (i != j) {
op_array->last_try_catch = j;
+ if (j == 0) {
+ efree(op_array->try_catch_array);
+ op_array->try_catch_array = NULL;
+ }
+
if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
zend_op *opline = new_opcodes;
zend_op *end = opline + len;