fix(coverity): use xstrndup() instead of vim_strsave() (#18363)

This commit is contained in:
zeertzjq
2022-05-03 09:29:55 +08:00
committed by GitHub
parent cf474021ed
commit 13520aae16
5 changed files with 17 additions and 9 deletions

View File

@@ -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;
}