Mercurial > hg > xemacs-beta
diff src/free-hook.c @ 269:b2472a1930f2 r20-5b33
Import from CVS: tag r20-5b33
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:27:19 +0200 |
parents | 966663fcf606 |
children | c5d627a313b1 |
line wrap: on
line diff
--- a/src/free-hook.c Mon Aug 13 10:26:31 2007 +0200 +++ b/src/free-hook.c Mon Aug 13 10:27:19 2007 +0200 @@ -226,7 +226,7 @@ { /* This can only happen if you try to free something that didn't come from malloc */ -#if 1 +#if !defined(__linux__) /* I originally wrote: "There's really no need to drop core." I have seen the error of my ways. -slb */ if (strict_free_check) @@ -243,7 +243,7 @@ if (size < 0) { /* This happens when you free twice */ -#if 1 +#if !defined(__linux__) /* See above comment. */ if (strict_free_check) { @@ -352,12 +352,13 @@ unsigned long old_size; void *result = malloc (size); + if (!ptr) return result; present = (EMACS_INT) gethash (ptr, pointer_table, (void **) &old_size); if (!present) { /* This can only happen by reallocing a pointer that didn't come from malloc. */ -#if 1 +#if !defined(__linux__) /* see comment in check_free(). */ abort (); #endif