patch 9.1.1098: leaking memory with completing multi lines
Problem: leaking memory with completing multi lines
(after v9.1.1086)
Solution: free allocated memory (glepnir)
closes: #16605
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/insexpand.c b/src/insexpand.c
index 9fdc1c0..a0f552e 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -4416,7 +4416,11 @@
if ((int)curwin->w_cursor.col > col)
{
if (stop_arrow() == FAIL)
+ {
+ if (remaining)
+ VIM_CLEAR(remaining);
return;
+ }
backspace_until_column(col);
compl_ins_end_col = curwin->w_cursor.col;
}
diff --git a/src/version.c b/src/version.c
index 0a254e5..12cdfce 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1098,
+/**/
1097,
/**/
1096,