diff src/misc2.c @ 625:81fe2ccc1207 v7.0179

updated for version 7.0179
author vimboss
date Thu, 12 Jan 2006 23:22:24 +0000
parents 9e359e5759f6
children 732c7ae5743e
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1426,13 +1426,15 @@ copy_option_part(option, buf, maxlen, se
 }
 
 /*
- * replacement for free() that ignores NULL pointers
+ * Replacement for free() that ignores NULL pointers.
+ * Also skip free() when exiting for sure, this helps when we caught a deadly
+ * signal that was caused by a crash in free().
  */
     void
 vim_free(x)
     void *x;
 {
-    if (x != NULL)
+    if (x != NULL && !really_exiting)
     {
 #ifdef MEM_PROFILE
 	mem_pre_free(&x);