summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-11-12 18:49:16 +0100
committerBram Moolenaar <Bram@vim.org>2014-11-12 18:49:16 +0100
commit42d84f8aed604e32e198a5fe31b3b7ab149ea63e (patch)
tree3168fac6d9e7f360ba06a90ffa2632b17ed4986c /src
parentb8e0bdbda377d0a3c3e24bea62503b9f95f8249a (diff)
downloadvim-git-42d84f8aed604e32e198a5fe31b3b7ab149ea63e.tar.gz
updated for version 7.4.513v7.4.513
Problem: Crash because reference count is wrong for list returned by getreg(). Solution: Increment the reference count. (Kimmy Lindvall)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c2
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 0 deletions
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
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 513,
+/**/
512,
/**/
511,