diff src/misc2.c @ 9169:0ea97a753a2d v7.4.1868

commit https://github.com/vim/vim/commit/b89a25f17e274dc308c584ea69a129ffbb26bc3d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 1 23:08:39 2016 +0200 patch 7.4.1868 Problem: Setting really_exiting causes memory leaks to be reported. Solution: Add the in_free_all_mem flag.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Jun 2016 23:15:06 +0200
parents 062eb6d28b0c
children c25898cc99c1
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1036,16 +1036,12 @@ static void free_findfile(void);
 free_all_mem(void)
 {
     buf_T	*buf, *nextbuf;
-    static int	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;
 
 # ifdef FEAT_AUTOCMD
     /* Don't want to trigger autocommands from here on. */