mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2703: Vim9: memory leak when failing on locked variable
Problem: Vim9: memory leak when failing on locked variable. Solution: Free the memory.
This commit is contained in:
@@ -1323,6 +1323,7 @@ def Test_var_declaration()
|
||||
unlet g:var_test
|
||||
unlet g:var_prefixed
|
||||
unlet g:other_var
|
||||
unlet g:globConst
|
||||
unlet g:FOO
|
||||
unlet g:FOOS
|
||||
unlet g:FLIST
|
||||
@@ -1375,7 +1376,7 @@ def Test_var_declaration_fails()
|
||||
SetGlobalConst()
|
||||
g:globConst = 234
|
||||
END
|
||||
CheckScriptFailure(lines, 'E741: Value is locked: globConst', 1)
|
||||
CheckScriptFailure(lines, 'E741: Value is locked: g:globConst', 6)
|
||||
unlet g:globConst
|
||||
|
||||
lines =<< trim END
|
||||
|
Reference in New Issue
Block a user