diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-08-14 12:07:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-14 12:07:11 +0100 |
commit | 63acae13f57c5ad4c8ec3146d0c458550b9e984e (patch) | |
tree | 50a6a623dcce89ae1f639c4c2e2f62904aee8840 /src/testdir/test_blob.vim | |
parent | c9b6570fab46bf2c246a954cfb8c0d95fe2746b3 (diff) |
patch 9.0.0204: indexof() may leak memoryv9.0.0204
Problem: indexof() may leak memory.
Solution: Free allocated values. (Yegappan Lakshmanan, closes #10916)
Diffstat (limited to 'src/testdir/test_blob.vim')
-rw-r--r-- | src/testdir/test_blob.vim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim index 46f2d61ad3..46370c4749 100644 --- a/src/testdir/test_blob.vim +++ b/src/testdir/test_blob.vim @@ -772,6 +772,7 @@ func Test_indexof() call assert_equal(-1, indexof(b, {i, v -> v == 0x1})) call assert_equal(1, indexof(b, "v:val == 0xad")) call assert_equal(-1, indexof(b, "v:val == 0xff")) + call assert_equal(-1, indexof(b, {_, v -> "v == 0xad"})) call assert_equal(-1, indexof(0z, "v:val == 0x0")) call assert_equal(-1, indexof(test_null_blob(), "v:val == 0xde")) |