summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 38e0fe824..624bf1c8d 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -6252,7 +6252,10 @@ script_get(eap, cmd)
NUL, eap->cookie, 0);
if (theline == NULL || STRCMP(end_pattern, theline) == 0)
+ {
+ vim_free(theline);
break;
+ }
ga_concat(&ga, theline);
ga_append(&ga, '\n');