From 13520aae163bfc243fc050cf16b89082c0896eaf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 3 May 2022 09:29:55 +0800 Subject: fix(coverity): use xstrndup() instead of vim_strsave() (#18363) --- src/nvim/api/ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api/ui.c') diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index f449ccc3c7..d1b86ed328 100644 --- a/src/nvim/api/ui.c +++ b/src/nvim/api/ui.c @@ -261,7 +261,7 @@ static void ui_set_option(UI *ui, bool init, String name, Object value, Error *e api_set_error(error, kErrorTypeValidation, "term_name must be a String"); return; } - set_tty_option("term", xstrdup(value.data.string.data)); + set_tty_option("term", string_to_cstr(value.data.string)); return; } -- cgit