mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0057: memory leak in exe_newdict()
Problem: memory leak in exe_newdict() Solution: Free the variable item (Huihui Huang). closes: #PR 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
6a239a1905
commit
71ace8ba8c
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
57,
|
||||
/**/
|
||||
56,
|
||||
/**/
|
||||
|
||||
@@ -290,6 +290,7 @@ exe_newdict(int count, ectx_T *ectx)
|
||||
if (dict_add(dict, item) == FAIL)
|
||||
{
|
||||
// can this ever happen?
|
||||
dictitem_free(item);
|
||||
dict_unref(dict);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user