Skip to content

Commit 8ba1276

Browse files
huanghuihui0904chrisbra
authored andcommitted
patch 9.2.0067: memory leak in dict_extend_func()
Problem: memory leak in dict_extend_func() Solution: Free d1 on early return (Huihui Huang) closes: #19518 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent c0740e0 commit 8ba1276

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/dict.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,11 @@ dict_extend_func(
13701370

13711371
if (type != NULL && check_typval_arg_type(type, &argvars[1],
13721372
func_name, 2) == FAIL)
1373+
{
1374+
if (is_new)
1375+
dict_unref(d1);
13731376
return;
1377+
}
13741378
dict_extend(d1, d2, action, func_name);
13751379

13761380
if (is_new)

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+
67,
737739
/**/
738740
66,
739741
/**/

0 commit comments

Comments
 (0)