diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-22 10:24:41 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-22 10:24:41 +0000 |
| commit | 55d1d7034ff822c944b698c23aa2490416bcf30c (patch) | |
| tree | 822136a990d18001b2db563f705887b258e810ce /sys/kern/kern_malloc.c | |
| parent | 60512ca0d2f4eb78a0a2cf88aacc118c1d23bf68 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_malloc.c')
| -rw-r--r-- | sys/kern/kern_malloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index a90d628f77a2..691b2117cb98 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -272,14 +272,16 @@ out: * This routine may not block. */ void -free(addr, type) - void *addr; +free(arg, type) + void const *arg; 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; @@ -387,7 +389,8 @@ reallocf(addr, size, type, flags) { void *mem; - if ((mem = realloc(addr, size, type, flags)) == NULL) + mem = realloc(addr, size, type, flags); + if (mem == NULL) free(addr, type); return (mem); } |
