summaryrefslogtreecommitdiffstats
path: root/src/eval.c
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/eval.c
parentb8e0bdbda377d0a3c3e24bea62503b9f95f8249a (diff)
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/eval.c')
-rw-r--r--src/eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index ba456f2bc2..ea24a9c37f 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
{