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:
James McCoy
2017-01-01 22:47:55 -05:00
parent 1feaa450cb
commit 945540b782
4 changed files with 10 additions and 10 deletions

View File

@@ -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();