diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-22 10:36:36 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-22 10:36:36 +0000 |
| commit | 68f2d20b70923abdb33ed404c221bc04bd96b7d7 (patch) | |
| tree | e266522d9bf5035f4900c37de6fdf64d1327035d /sys/kern/kern_malloc.c | |
| parent | 55d1d7034ff822c944b698c23aa2490416bcf30c (diff) | |
Notes
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 691b2117cb98..a90d628f77a2 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); } |
