patch 9.2.0065: memory leak in invoke_sync_listeners()
Commit:
https://github.com/vim/vim/commit/ac28237e620c9bbf750b4343507a2c2ac1acaace
Author: Huihui Huang <[email protected]>
Date: Thu Feb 26 21:02:27 2026 +0000
patch 9.2.0065: memory leak in invoke_sync_listeners()
Problem: memory leak in invoke_sync_listeners()
Solution: Free the recorded_changes on early return
(Huihui Huang).
closes: #19516
Signed-off-by: Huihui Huang <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/change.c b/src/change.c
index eadcfd0e2..451aa99a0 100644
--- a/src/change.c
+++ b/src/change.c
@@ -557,7 +557,10 @@ invoke_sync_listeners(
dict = dict_alloc();
if (dict == NULL)
+ {
+ list_unref(recorded_changes);
return;
+ }
dict_add_number(dict, "lnum", (varnumber_T)start);
dict_add_number(dict, "end", (varnumber_T)end);
diff --git a/src/version.c b/src/version.c
index 4443e6eac..046a7e473 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 65,
/**/
64,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vvihL-00Ebrp-BO%40256bit.org.