In heredoc_get(), a list is allocated to store heredoc lines (lines 871–873):
l = list_alloc(); if (l == NULL) return NULL;
Later, when vim9compile is enabled, if compile_all_expr_in_str() fails the function returns early (lines 948–953):
if (compile_all_expr_in_str(str, evalstr, cctx) == FAIL) { vim_free(theline); vim_free(text_indent); return FAIL; }
On this early-return path, the allocated list l is not freed, resulting in a memory leak.
Free l before returning when compile_all_expr_in_str() fails. The fix is included in this commit.
https://github.com/vim/vim/pull/19563
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()