mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
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
This commit is contained in:
@@ -14588,8 +14588,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
|||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
if (retlist) {
|
if (retlist) {
|
||||||
// return an empty list when there's no output
|
// return an empty list when there's no output
|
||||||
rettv->v_type = VAR_LIST;
|
rettv_list_alloc(rettv);
|
||||||
rettv->vval.v_list = list_alloc();
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user