summaryrefslogtreecommitdiff
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, 2 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index b87cdedb6..c894c5896 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1146,7 +1146,8 @@ lambda_function_body(
ga_init2(&newlines, (int)sizeof(char_u *), 10);
if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
{
- vim_free(cmdline);
+ if (cmdline != line_to_free)
+ vim_free(cmdline);
goto erret;
}