mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
vim-patch:7.4.1868
Problem: Setting really_exiting causes memory leaks to be reported.
Solution: Add the in_free_all_mem flag.
b89a25f17e
This commit is contained in:
@@ -488,16 +488,12 @@ void time_to_bytes(time_t time_, uint8_t buf[8])
|
||||
void free_all_mem(void)
|
||||
{
|
||||
buf_T *buf, *nextbuf;
|
||||
static bool entered = false;
|
||||
|
||||
/* When we cause a crash here it is caught and Vim tries to exit cleanly.
|
||||
* Don't try freeing everything again. */
|
||||
if (entered)
|
||||
if (entered_free_all_mem)
|
||||
return;
|
||||
entered = true;
|
||||
|
||||
// Set this flag to indicate some errors can be ignored.
|
||||
really_exiting = true;
|
||||
entered_free_all_mem = true;
|
||||
|
||||
// Don't want to trigger autocommands from here on.
|
||||
block_autocmds();
|
||||
|
Reference in New Issue
Block a user