mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
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:
committed by
Christian Brabandt
parent
97c5bed84b
commit
ac28237e62
@@ -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);
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
65,
|
||||
/**/
|
||||
64,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user