diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2014-11-25 19:18:18 +0000 |
---|---|---|
committer | Rui Abreu Ferreira <raf-ep@gmx.com> | 2014-11-25 20:00:27 +0000 |
commit | ea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd (patch) | |
tree | bebf4e7eacc34c9206ad69b027bead69a6ed004d /src/nvim/eval.c | |
parent | 1c25f1d9475ad763138c67f538aee37ef9ab5aee (diff) | |
download | rneovim-ea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd.tar.gz rneovim-ea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd.tar.bz2 rneovim-ea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd.zip |
Add missing refcount increment for systemlist()
- get_system_output_as_rettv() was missing a refcount increment when
returning an empty list, i.e. when there was no output
- we now use rettv_list_aloc() instead of list_alloc()
- issue #1530
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 1a80198515..5975777261 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -14588,8 +14588,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, if (res == NULL) { if (retlist) { // return an empty list when there's no output - rettv->v_type = VAR_LIST; - rettv->vval.v_list = list_alloc(); + rettv_list_alloc(rettv); } return; } |