diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-11-12 18:49:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-11-12 18:49:16 +0100 |
commit | 42d84f8aed604e32e198a5fe31b3b7ab149ea63e (patch) | |
tree | 3168fac6d9e7f360ba06a90ffa2632b17ed4986c /src | |
parent | b8e0bdbda377d0a3c3e24bea62503b9f95f8249a (diff) | |
download | vim-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.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
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, |