diff src/testdir/test_listdict.vim @ 34971:0cc43bca5bd9 v9.1.0341

patch 9.1.0341: Problem: a few memory leaks are found Commit: https://github.com/vim/vim/commit/29269a71b5ac8a87c6c4beca35c173a19a2c9398 Author: Christian Brabandt <cb@256bit.org> Date: Tue Apr 16 22:44:31 2024 +0200 patch 9.1.0341: Problem: a few memory leaks are found Problem: a few memory leaks are found (LuMingYinDetect ) Solution: properly free the memory Fixes the following problems: - Memory leak in f_maplist() fixes: #14486 - Memory leak in option.c fixes: #14485 - Memory leak in f_resolve() fixes: #14484 - Memory leak in f_autocmd_get() related: #14474 - Memory leak in dict_extend_func() fixes: #14477 fixes: #14238 closes: #14517 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 16 Apr 2024 23:00:03 +0200
parents cd7acb9bc4fd
children ddd5eaa2c0dc
line wrap: on
line diff
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -1530,4 +1530,10 @@ func Test_indexof()
   delfunc TestIdx
 endfunc
 
+func Test_extendnew_leak()
+  " This used to leak memory
+  for i in range(100) | silent! call extendnew([], [], []) | endfor
+  for i in range(100) | silent! call extendnew({}, {}, {}) | endfor
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab