From dd297bc11d2793ba61638972778c57f2da14e8b5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 10 Dec 2021 10:37:38 +0000 Subject: patch 8.2.3771: Vim9: accessing freed memory when checking type Problem: Vim9: accessing freed memory when checking type. Solution: Make a copy of a function type. --- src/structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/structs.h') diff --git a/src/structs.h b/src/structs.h index be444e312..b8ffbe4a7 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1809,6 +1809,7 @@ struct svar_S { char_u *sv_name; // points into "sn_all_vars" di_key typval_T *sv_tv; // points into "sn_vars" or "sn_all_vars" di_tv type_T *sv_type; + int sv_type_allocated; // call free_type() for sv_type int sv_const; // 0, ASSIGN_CONST or ASSIGN_FINAL int sv_export; // "export let var = val" }; -- cgit v1.2.1