diff options
author | phk <phk@FreeBSD.org> | 2003-07-22 10:36:36 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-07-22 10:36:36 +0000 |
commit | eb30c92e4910efd8f5aa99168e8b74d8414f3eb1 (patch) | |
tree | e266522d9bf5035f4900c37de6fdf64d1327035d /sys/kern/kern_malloc.c | |
parent | c4a9334fa698660a5dd1a0c4fddb61ed0893fc58 (diff) | |
download | FreeBSD-src-eb30c92e4910efd8f5aa99168e8b74d8414f3eb1.zip FreeBSD-src-eb30c92e4910efd8f5aa99168e8b74d8414f3eb1.tar.gz |
Revert stuff which accidentally ended up in the previous commit.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 691b211..a90d628 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -272,16 +272,14 @@ out: * This routine may not block. */ void -free(arg, type) - void const *arg; +free(addr, type) + void *addr; struct malloc_type *type; { register struct malloc_type *ksp = type; uma_slab_t slab; u_long size; - void *addr; - addr = __DECONST(void *, arg); /* free(NULL, ...) does nothing */ if (addr == NULL) return; @@ -389,8 +387,7 @@ reallocf(addr, size, type, flags) { void *mem; - mem = realloc(addr, size, type, flags); - if (mem == NULL) + if ((mem = realloc(addr, size, type, flags)) == NULL) free(addr, type); return (mem); } |