forked from aniani/vim
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[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1136,
|
||||||
/**/
|
/**/
|
||||||
1135,
|
1135,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -99,8 +99,11 @@ parse_member(
|
|||||||
int res = eval0(expr, &tv, eap, &evalarg);
|
int res = eval0(expr, &tv, eap, &evalarg);
|
||||||
|
|
||||||
if (res == OK)
|
if (res == OK)
|
||||||
|
{
|
||||||
type = typval2type(&tv, get_copyID(), type_list,
|
type = typval2type(&tv, get_copyID(), type_list,
|
||||||
TVTT_DO_MEMBER);
|
TVTT_DO_MEMBER);
|
||||||
|
clear_tv(&tv);
|
||||||
|
}
|
||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
{
|
{
|
||||||
semsg(_(e_cannot_get_object_member_type_from_initializer_str),
|
semsg(_(e_cannot_get_object_member_type_from_initializer_str),
|
||||||
|
Reference in New Issue
Block a user