Skip to content

Commit 7d2a579

Browse files
committed
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().
1 parent 8b29aba commit 7d2a579

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/eval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6027,6 +6027,7 @@ rettv_list_alloc(typval_T *rettv)
60276027

60286028
rettv->vval.v_list = l;
60296029
rettv->v_type = VAR_LIST;
6030+
rettv->v_lock = 0;
60306031
++l->lv_refcount;
60316032
return OK;
60326033
}
@@ -7277,6 +7278,7 @@ rettv_dict_alloc(typval_T *rettv)
72777278

72787279
rettv->vval.v_dict = d;
72797280
rettv->v_type = VAR_DICT;
7281+
rettv->v_lock = 0;
72807282
++d->dv_refcount;
72817283
return OK;
72827284
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1679,
751753
/**/
752754
1678,
753755
/**/

0 commit comments

Comments
 (0)