# HG changeset patch # User Bram Moolenaar # Date 1415814556 -3600 # Node ID 6ad9facba57daad4c68b8d1cb3a8efe12d6ae4a9 # Parent 135901a3246c94df16ab657d14d0e016e58729b8 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) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -12008,6 +12008,8 @@ f_getreg(argvars, rettv) rettv->v_type = VAR_LIST; rettv->vval.v_list = (list_T *)get_reg_contents(regname, (arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST); + if (rettv->vval.v_list != NULL) + ++rettv->vval.v_list->lv_refcount; } else { diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 513, +/**/ 512, /**/ 511,