aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-19 11:29:10 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-19 11:29:35 +0800
commit1c12f844ad6db504e1435b5e4b633eb87b932180 (patch)
tree91b3cff369f70f248bb06a15b6d32db77006391b /src/nvim/memline.c
parent519acb3ec1cb1f1ee7fe73e43dd4db02e49f336f (diff)
downloadrneovim-1c12f844ad6db504e1435b5e4b633eb87b932180.tar.gz
rneovim-1c12f844ad6db504e1435b5e4b633eb87b932180.tar.bz2
rneovim-1c12f844ad6db504e1435b5e4b633eb87b932180.zip
refactor(eval): use tv_list_append_allocated_string()
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 498b4b5960..2528b5c0d3 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -1367,8 +1367,7 @@ int recover_names(char *fname, bool do_list, list_T *ret_list, int nr, char **fn
for (int i = 0; i < num_files; i++) {
char *name = concat_fnames(dir_name, files[i], true);
if (name != NULL) {
- tv_list_append_string(ret_list, name, -1);
- xfree(name);
+ tv_list_append_allocated_string(ret_list, name);
}
}
} else {