Skip to content

Commit e798330

Browse files
committed
updated for version 7.4.513
Problem: Crash because reference count is wrong for list returned by getreg(). Solution: Increment the reference count. (Kimmy Lindvall)
1 parent 04af9b2 commit e798330

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/eval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12008,6 +12008,8 @@ f_getreg(argvars, rettv)
1200812008
rettv->v_type = VAR_LIST;
1200912009
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
1201012010
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
12011+
if (rettv->vval.v_list != NULL)
12012+
++rettv->vval.v_list->lv_refcount;
1201112013
}
1201212014
else
1201312015
{

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
513,
744746
/**/
745747
512,
746748
/**/

0 commit comments

Comments
 (0)