patch 9.1.1331: Leaking memory with cmdcomplete()
Problem: Leaking memory with cmdcomplete()
(zeertzjq, after v9.1.1329)
Solution: free the memory (Girish Palya)
closes: #17190
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 1137708..8445236 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1916,8 +1916,7 @@
}
// Trigger CmdlineLeavePre autocommand
- if (ccline.cmdfirstc != NUL && (c == '\n' || c == '\r' || c == K_KENTER
- || c == ESC || c == Ctrl_C))
+ if (c == '\n' || c == '\r' || c == K_KENTER || c == ESC || c == Ctrl_C)
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINELEAVEPRE);
// The wildmenu is cleared if the pressed key is not used for