aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/provider/python.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-09-13 09:58:29 +0800
committerGitHub <noreply@github.com>2026-09-13 01:58:29 +0000
commit6d15a3c5b420ded1982b904bf8bf87e911971033 (patch)
treec315c305a8d451d50dc8abe713e8db84a025273a /runtime/lua/vim/provider/python.lua
parent4beea5c3f45d555c64216cc98f5ce70d43cacfb7 (diff)
downloadrneovim-6d15a3c5b420ded1982b904bf8bf87e911971033.tar.gz
rneovim-6d15a3c5b420ded1982b904bf8bf87e911971033.tar.bz2
rneovim-6d15a3c5b420ded1982b904bf8bf87e911971033.zip
vim-patch:9.2.1081: memory leak in f_setmatches() (#41892)
Problem: f_setmatches() increments lv_refcount of the position list "s" once for every "posN" entry it appends, but match_add() does not keep a reference and list_unref() is called only once. With two or more positions the list, and the position lists it references, are not released until the next garbage collection. When a "posN" value is not a List the function returns without releasing "s" at all. Solution: Take one reference right after list_alloc(), drop the per-item increment, and list_unref() the list on the early return. Add a test that reads the reference counts (dyingc). closes: vim/vim#21284 https://github.com/vim/vim/commit/d5b24f50846e1728503a6c6d3d2670e0f2cada4e Co-authored-by: dyingc <dyingc@hotmail.com>
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions