mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
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:
@@ -12008,6 +12008,8 @@ f_getreg(argvars, rettv)
|
|||||||
rettv->v_type = VAR_LIST;
|
rettv->v_type = VAR_LIST;
|
||||||
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
|
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
|
||||||
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
|
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
|
||||||
|
if (rettv->vval.v_list != NULL)
|
||||||
|
++rettv->vval.v_list->lv_refcount;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
513,
|
||||||
/**/
|
/**/
|
||||||
512,
|
512,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user