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 <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Huihui Huang
2026-02-26 21:02:27 +00:00
committed by Christian Brabandt
parent 97c5bed84b
commit ac28237e62
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -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);
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
65,
/**/
64,
/**/