From: Bram Moolenaar Date: Wed, 12 Nov 2014 17:49:16 +0000 (+0100) Subject: updated for version 7.4.513 X-Git-Tag: v7.4.513 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42d84f8aed604e32e198a5fe31b3b7ab149ea63e;p=vim 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 index ba456f2bc..ea24a9c37 100644 --- 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 index 2aaef3cc8..df18f5e96 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 513, /**/ 512, /**/