0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4716: memory allocation failure not tested when defining a function

Problem:    Memory allocation failure not tested when defining a function.
Solution:   Add a test. (Yegappan Lakshmanan, closes #10127)
This commit is contained in:
Yegappan Lakshmanan
2022-04-09 11:09:07 +01:00
committed by Bram Moolenaar
parent 5e1792270a
commit 7c7e19cf50
7 changed files with 65 additions and 1 deletions

View File

@@ -1092,7 +1092,7 @@ get_function_body(
}
// Add the line to the function.
if (ga_grow(newlines, 1 + sourcing_lnum_off) == FAIL)
if (ga_grow_id(newlines, 1 + sourcing_lnum_off, aid_get_func) == FAIL)
goto theend;
if (heredoc_concat_len > 0)