forked from aniani/vim
patch 7.4.1715
Problem: Double free when a partial is in a cycle with a list or dict.
(Nikolai Pavlov)
Solution: Do not free a nested list or dict used by the partial.
This commit is contained in:
@@ -220,3 +220,21 @@ func Test_bind_in_python()
|
||||
endtry
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" This causes double free on exit if EXITFREE is defined.
|
||||
func Test_cyclic_list_arg()
|
||||
let l = []
|
||||
let Pt = function('string', [l])
|
||||
call add(l, Pt)
|
||||
unlet l
|
||||
unlet Pt
|
||||
endfunc
|
||||
|
||||
" This causes double free on exit if EXITFREE is defined.
|
||||
func Test_cyclic_dict_arg()
|
||||
let d = {}
|
||||
let Pt = function('string', [d])
|
||||
let d.Pt = Pt
|
||||
unlet d
|
||||
unlet Pt
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user