Skip to content

Commit bcc5d26

Browse files
authoredJan 9, 2023
ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace() (#10146)
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 d03025b commit bcc5d26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎ext/opcache/jit/zend_jit_trace.c

+1
Original file line numberDiff line numberDiff line change
@@ -7114,6 +7114,7 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace
71147114
if (t->stack_map_size) {
71157115
zend_jit_trace_stack *shared_stack_map = (zend_jit_trace_stack*)zend_shared_alloc(t->stack_map_size * sizeof(zend_jit_trace_stack));
71167116
if (!shared_stack_map) {
7117+
efree(t->stack_map);
71177118
ret = ZEND_JIT_TRACE_STOP_NO_SHM;
71187119
goto exit;
71197120
}

0 commit comments

Comments
 (0)