In expand_findfunc(), the list l is allocated by call_findfunc() (lines 7076–7079):
l = call_findfunc(pat, VVAL_TRUE); if (l == NULL) return FAIL;
However, there are early-return paths after l is allocated (lines 7081–7087):
len = list_len(l); if (len == 0) // empty List return FAIL; *files = ALLOC_MULT(char_u *, len); if (*files == NULL) return FAIL;
On these failure paths, l is not freed. Since list_free(l) is only called on the success path near the end of the function, l is leaked when returning early.
Free l before returning on error paths. The fix is included in this commit.
https://github.com/vim/vim/pull/19564
(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.![]()