summaryrefslogtreecommitdiff
path: root/src/userfunc.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-04-09 11:09:07 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-09 11:09:07 +0100
commit7c7e19cf50d76568e2637ad66b095044a41c6a82 (patch)
tree39534337197e3f8f2d713910050a977877effe33 /src/userfunc.c
parent5e1792270a072a96157e5d5e1d6a97414e26d0bf (diff)
downloadvim-git-7c7e19cf50d76568e2637ad66b095044a41c6a82.tar.gz
patch 8.2.4716: memory allocation failure not tested when defining a functionv8.2.4716
Problem: Memory allocation failure not tested when defining a function. Solution: Add a test. (Yegappan Lakshmanan, closes #10127)
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index c80a49051..7ad338856 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -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)