Skip to content

Commit 2392a42

Browse files
committed
ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace()
A copy of this piece of code exists in zend_jit_compile_side_trace(), but there, the leak bug does not exist. This bug exists since both copies of this piece of code were added in commit 4bf2d09
1 parent e72778a commit 2392a42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7095,6 +7095,7 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace
70957095
if (t->stack_map_size) {
70967096
zend_jit_trace_stack *shared_stack_map = (zend_jit_trace_stack*)zend_shared_alloc(t->stack_map_size * sizeof(zend_jit_trace_stack));
70977097
if (!shared_stack_map) {
7098+
efree(t->stack_map);
70987099
ret = ZEND_JIT_TRACE_STOP_NO_SHM;
70997100
goto exit;
71007101
}

0 commit comments

Comments
 (0)