Skip to content

Commit e2cf84d

Browse files
huanghuihui0904chrisbra
authored andcommitted
patch 9.2.0244: memory leak in eval8()
Problem: memory leak in eval8() Solution: Free type_list() even when evaluate is FALSE (Huihui Huang) closes: #19819 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 0effd2f commit e2cf84d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/eval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4856,9 +4856,9 @@ eval8(
48564856

48574857
res = eval9(arg, rettv, evalarg, want_string);
48584858

4859-
if (want_type != NULL && evaluate)
4859+
if (want_type != NULL)
48604860
{
4861-
if (res == OK)
4861+
if (evaluate && res == OK)
48624862
{
48634863
type_T *actual = typval2type(rettv, get_copyID(), &type_list,
48644864
TVTT_DO_MEMBER);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
244,
737739
/**/
738740
243,
739741
/**/

0 commit comments

Comments
 (0)