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:
@@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1136,
|
||||
/**/
|
||||
1135,
|
||||
/**/
|
||||
|
@@ -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),
|
||||
|
Reference in New Issue
Block a user