diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-03 09:29:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 09:29:55 +0800 |
commit | 13520aae163bfc243fc050cf16b89082c0896eaf (patch) | |
tree | 7487c15a5539ba28ebeb10035587f4b870bbc70f /src/nvim/lua/executor.c | |
parent | cf474021ed44f197da3c67214fcb95a20886799c (diff) | |
download | rneovim-13520aae163bfc243fc050cf16b89082c0896eaf.tar.gz rneovim-13520aae163bfc243fc050cf16b89082c0896eaf.tar.bz2 rneovim-13520aae163bfc243fc050cf16b89082c0896eaf.zip |
fix(coverity): use xstrndup() instead of vim_strsave() (#18363)
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 2c4d527fdf..9cdc299ea7 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1647,9 +1647,7 @@ int nlua_expand_pat(expand_T *xp, char_u *pat, int *num_results, char_u ***resul goto cleanup_array; } - GA_APPEND(char_u *, - &result_array, - vim_strsave((char_u *)v.data.string.data)); + GA_APPEND(char_u *, &result_array, (char_u *)string_to_cstr(v.data.string)); } xp->xp_pattern += prefix_len; |