aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index ef2f9e9d0e..c8a8240fee 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -217,7 +217,8 @@ void buffer_set_slice(Buffer buffer,
goto end;
}
- // Same as with replacing
+ // Same as with replacing, but we also need to free lines
+ free(lines[i]);
lines[i] = NULL;
extra++;
}