]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0059: memory leak in fill_assert_error v9.2.0059
authorHuihui Huang <625173@qq.com>
Wed, 25 Feb 2026 20:36:36 +0000 (20:36 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 25 Feb 2026 20:39:39 +0000 (20:39 +0000)
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>
src/testing.c
src/version.c

index 75e5edfc710157e415098e66c7e926b58151872e..eaa7c69f84b105580c089256e3b259ef0dcdf462 100644 (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)
index 2f389a74e1b45bb9e631075cb1aa6c155b87d24f..1db0171fedca476556a6a55a90cbe300dae8cbb7 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    59,
 /**/
     58,
 /**/