patch 9.2.0059: memory leak in fill_assert_error

Problem:  memory leak in fill_assert_error
Solution: Free the variables (Huihui Huang).

fixes:  #19502
closes: #19507

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
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:36:36 +00:00
committed by Christian Brabandt
parent aa18b85df5
commit e8432bc5d5
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -188,7 +188,13 @@ fill_assert_error(
exp_tv->vval.v_dict = dict_alloc();
got_tv->vval.v_dict = dict_alloc();
if (exp_tv->vval.v_dict == NULL || got_tv->vval.v_dict == NULL)
{
dict_unref(exp_tv->vval.v_dict);
exp_tv->vval.v_dict = NULL;
dict_unref(got_tv->vval.v_dict);
got_tv->vval.v_dict = NULL;
return;
}
todo = (int)exp_d->dv_hashtab.ht_used;
FOR_ALL_HASHTAB_ITEMS(&exp_d->dv_hashtab, hi, todo)
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
59,
/**/
58,
/**/