mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.2.3246: memory use after free
Problem: Memory use after free.
Solution: When clearing a string option set the pointer to "empty_option".
77111e2bfc
This commit is contained in:
parent
5e4fcc8b36
commit
20fc0519af
@ -770,7 +770,7 @@ void free_all_options(void)
|
||||
}
|
||||
} else if (options[i].var != VAR_WIN && (options[i].flags & P_STRING)) {
|
||||
// buffer-local option: free global value
|
||||
free_string_option(*(char_u **)options[i].var);
|
||||
clear_string_option((char_u **)options[i].var);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user