diff options
author | bp <bp@FreeBSD.org> | 2001-01-31 04:50:20 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2001-01-31 04:50:20 +0000 |
commit | 076c2e70fda136ef48c7da93fc16bf7d4c7cb0cf (patch) | |
tree | 9d890169bad4aa8fae0892a28852ca0f5723e2d8 /sys/kern | |
parent | 6150a5017458fd74462db58efb154b09f995f8f9 (diff) | |
download | FreeBSD-src-076c2e70fda136ef48c7da93fc16bf7d4c7cb0cf.zip FreeBSD-src-076c2e70fda136ef48c7da93fc16bf7d4c7cb0cf.tar.gz |
Let M_PANIC go back to the private tree as its intention isn't understood well
for now.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_malloc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 2186007..089d867 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -164,8 +164,7 @@ malloc(size, type, flags) if (flags & M_NOWAIT) { splx(s); mtx_exit(&malloc_mtx, MTX_DEF); - va = NULL; - goto checkpanic; + return ((void *) NULL); } if (ksp->ks_limblocks < 65535) ksp->ks_limblocks++; @@ -189,7 +188,7 @@ malloc(size, type, flags) if (va == NULL) { splx(s); - goto checkpanic; + return ((void *) NULL); } /* * Enter malloc_mtx after the error check to avoid having to @@ -283,9 +282,6 @@ out: /* XXX: Do idle pre-zeroing. */ if (va != NULL && (flags & M_ZERO)) bzero(va, size); -checkpanic: - if (va == NULL && (flags & M_PANIC)) - panic("malloc: failed to allocate %ld bytes", size); return ((void *) va); } |