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:
Huihui Huang
2026-02-25 20:18:16 +00:00
committed by Christian Brabandt
parent 6a239a1905
commit 71ace8ba8c
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
57,
/**/
56,
/**/
+1
View File
@@ -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;
}