0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1136: memory leak when getting class member type from expr

Problem:    Memory leak when getting class member type from expr.
Solution:   Clear the expression result.
This commit is contained in:
Bram Moolenaar
2023-01-02 21:04:04 +00:00
parent 03ff0c6681
commit e83c133eb9
2 changed files with 5 additions and 0 deletions

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1136,
/**/
1135,
/**/

View File

@@ -99,8 +99,11 @@ parse_member(
int res = eval0(expr, &tv, eap, &evalarg);
if (res == OK)
{
type = typval2type(&tv, get_copyID(), type_list,
TVTT_DO_MEMBER);
clear_tv(&tv);
}
if (type == NULL)
{
semsg(_(e_cannot_get_object_member_type_from_initializer_str),