From e3647c8bf5b8143a24a37172e608a2e0c4661318 Mon Sep 17 00:00:00 2001 From: glepnir Date: Mon, 10 Feb 2025 21:16:32 +0100 Subject: [PATCH] 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 Signed-off-by: Christian Brabandt --- src/insexpand.c | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/insexpand.c b/src/insexpand.c index 9fdc1c0ffb..a0f552e954 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -4416,7 +4416,11 @@ ins_compl_delete(void) 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 0a254e5cf5..12cdfce5f6 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1098, /**/ 1097, /**/