mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1679
Problem: Coverity: copying value of v_lock without initializing it.
Solution: Init v_lock in rettv_list_alloc() and rettv_dict_alloc().
7d2a5796d3
This commit is contained in:
parent
42731a9a15
commit
7531410169
@ -4951,7 +4951,8 @@ static list_T *rettv_list_alloc(typval_T *rettv)
|
||||
list_T *l = list_alloc();
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
++l->lv_refcount;
|
||||
rettv->v_lock = VAR_UNLOCKED;
|
||||
l->lv_refcount++;
|
||||
return l;
|
||||
}
|
||||
|
||||
@ -6131,7 +6132,8 @@ static void rettv_dict_alloc(typval_T *rettv)
|
||||
|
||||
rettv->vval.v_dict = d;
|
||||
rettv->v_type = VAR_DICT;
|
||||
++d->dv_refcount;
|
||||
rettv->v_lock = VAR_UNLOCKED;
|
||||
d->dv_refcount++;
|
||||
}
|
||||
|
||||
/// Clear all the keys of a Dictionary. "d" remains a valid empty Dictionary.
|
||||
|
@ -764,7 +764,7 @@ static int included_patches[] = {
|
||||
1682,
|
||||
// 1681,
|
||||
// 1680 NA
|
||||
// 1679,
|
||||
1679,
|
||||
// 1678 NA
|
||||
// 1677 NA
|
||||
1676,
|
||||
|
Loading…
Reference in New Issue
Block a user