Mercurial > vim
changeset 8781:65be74c1467b v7.4.1679
commit https://github.com/vim/vim/commit/7d2a5796d39905a972e8f74af5f7b0a62e3de173
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 28 22:30:50 2016 +0200
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().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Mar 2016 22:45:07 +0200 |
parents | f43c23a3589d |
children | 6c99467edf7d |
files | src/eval.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }