comparison 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
comparison
equal deleted inserted replaced
624:91e7d4a7b3b0 625:81fe2ccc1207
1424 *option = p; 1424 *option = p;
1425 return len; 1425 return len;
1426 } 1426 }
1427 1427
1428 /* 1428 /*
1429 * replacement for free() that ignores NULL pointers 1429 * Replacement for free() that ignores NULL pointers.
1430 * Also skip free() when exiting for sure, this helps when we caught a deadly
1431 * signal that was caused by a crash in free().
1430 */ 1432 */
1431 void 1433 void
1432 vim_free(x) 1434 vim_free(x)
1433 void *x; 1435 void *x;
1434 { 1436 {
1435 if (x != NULL) 1437 if (x != NULL && !really_exiting)
1436 { 1438 {
1437 #ifdef MEM_PROFILE 1439 #ifdef MEM_PROFILE
1438 mem_pre_free(&x); 1440 mem_pre_free(&x);
1439 #endif 1441 #endif
1440 free(x); 1442 free(x);