1
0
forked from aniani/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)
This commit is contained in:
Bram Moolenaar
2014-11-12 18:49:16 +01:00
parent b8e0bdbda3
commit 42d84f8aed
2 changed files with 4 additions and 0 deletions

View File

@@ -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
{

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
513,
/**/
512,
/**/