aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2014-11-25 19:18:18 +0000
committerRui Abreu Ferreira <raf-ep@gmx.com>2014-11-25 20:00:27 +0000
commitea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd (patch)
treebebf4e7eacc34c9206ad69b027bead69a6ed004d /src
parent1c25f1d9475ad763138c67f538aee37ef9ab5aee (diff)
downloadrneovim-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')
-rw-r--r--src/nvim/eval.c3
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;
}