diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/log.c | 6 | ||||
-rw-r--r-- | src/nvim/os_unix.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/log.c b/src/nvim/log.c index 578217db41..719f0da340 100644 --- a/src/nvim/log.c +++ b/src/nvim/log.c @@ -109,6 +109,12 @@ bool logmsg(int log_level, const char *context, const char *func_name, return false; } +#ifdef EXITFREE + // Logging after we've already started freeing all our memory will only cause + // pain. We need access to VV_PROGPATH, homedir, etc. + assert(!entered_free_all_mem); +#endif + log_lock(); bool ret = false; FILE *log_file = open_log_file(); diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 27660712da..09ba718302 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -149,11 +149,12 @@ void mch_exit(int r) stream_set_blocking(input_global_fd(), true); // normalize stream (#2598) } + ILOG("Nvim exit: %d", r); + #ifdef EXITFREE free_all_mem(); #endif - ILOG("Nvim exit: %d", r); exit(r); } |