diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-28 22:30:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-28 22:30:50 +0200 |
commit | 7d2a5796d39905a972e8f74af5f7b0a62e3de173 (patch) | |
tree | ab771472f1c3918134350367a1ee5fa7edfc44a8 | |
parent | 8b29aba0192cc56294ef49bb3c01adff4b8f3a28 (diff) | |
download | vim-git-7d2a5796d39905a972e8f74af5f7b0a62e3de173.tar.gz |
patch 7.4.1679v7.4.1679
Problem: Coverity: copying value of v_lock without initializing it.
Solution: Init v_lock in rettv_list_alloc() and rettv_dict_alloc().
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 2c093d415..cd7ce25cd 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; } diff --git a/src/version.c b/src/version.c index ec283a19e..e1f7a2add 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1679, +/**/ 1678, /**/ 1677, |