mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
Fix the memory leaking
This commit is contained in:
@@ -1792,9 +1792,12 @@ do_set (
|
|||||||
errmsg = did_set_string_option(opt_idx, (char_u **)varp,
|
errmsg = did_set_string_option(opt_idx, (char_u **)varp,
|
||||||
new_value_alloced, oldval, errbuf, opt_flags);
|
new_value_alloced, oldval, errbuf, opt_flags);
|
||||||
|
|
||||||
/* If error detected, print the error message. */
|
// If error detected, print the error message.
|
||||||
if (errmsg != NULL)
|
if (errmsg != NULL) {
|
||||||
|
xfree(saved_origval);
|
||||||
goto skip;
|
goto skip;
|
||||||
|
}
|
||||||
|
|
||||||
if (saved_origval != NULL) {
|
if (saved_origval != NULL) {
|
||||||
char_u buf_type[7];
|
char_u buf_type[7];
|
||||||
vim_snprintf((char *)buf_type, ARRAY_SIZE(buf_type), "%s",
|
vim_snprintf((char *)buf_type, ARRAY_SIZE(buf_type), "%s",
|
||||||
|
Reference in New Issue
Block a user