summaryrefslogtreecommitdiffstats
path: root/src/userfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index 00e499fd0f..ce144a3978 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4977,7 +4977,10 @@ define_function(
: eval_isnamec(name_base[i])); ++i)
;
if (name_base[i] != NUL)
+ {
emsg_funcname(e_invalid_argument_str, arg);
+ goto ret_free;
+ }
// In Vim9 script a function cannot have the same name as a
// variable.