diff options
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 63914f3a46..ca6aa6381d 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -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(); |