From ea8cc88e6ab4a6c7288d2364d9eba6417a7de6cd Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Tue, 25 Nov 2014 19:18:18 +0000 Subject: 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 --- src/nvim/eval.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- cgit