]> granicus.if.org Git - vim/commitdiff
patch 7.4.1679 v7.4.1679
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 20:30:50 +0000 (22:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 20:30:50 +0000 (22:30 +0200)
Problem:    Coverity: copying value of v_lock without initializing it.
Solution:   Init v_lock in rettv_list_alloc() and rettv_dict_alloc().

src/eval.c
src/version.c

index 2c093d4154e630f89abaa28aff258aef571f4e9c..cd7ce25cd99e0a11494355ece25903b052adca5b 100644 (file)
@@ -6027,6 +6027,7 @@ rettv_list_alloc(typval_T *rettv)
 
     rettv->vval.v_list = l;
     rettv->v_type = VAR_LIST;
+    rettv->v_lock = 0;
     ++l->lv_refcount;
     return OK;
 }
@@ -7277,6 +7278,7 @@ rettv_dict_alloc(typval_T *rettv)
 
     rettv->vval.v_dict = d;
     rettv->v_type = VAR_DICT;
+    rettv->v_lock = 0;
     ++d->dv_refcount;
     return OK;
 }
index ec283a19e2d7072d42e2f0794ed819ca08b1fa2a..e1f7a2addad714664b387f8e2b20a9b136fc0746 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1679,
 /**/
     1678,
 /**/