diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
commit | 48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch) | |
tree | 29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/arch/zaurus | |
parent | a29a93ecbd0d69878182d5959b330ae5badcadc7 (diff) |
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/arch/zaurus')
-rw-r--r-- | sys/arch/zaurus/dev/zaurus_flash.c | 22 | ||||
-rw-r--r-- | sys/arch/zaurus/stand/zboot/diskprobe.c | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c index 8ded12ef0c5..1a474642718 100644 --- a/sys/arch/zaurus/dev/zaurus_flash.c +++ b/sys/arch/zaurus/dev/zaurus_flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_flash.c,v 1.12 2014/05/08 21:17:01 miod Exp $ */ +/* $OpenBSD: zaurus_flash.c,v 1.13 2014/07/12 18:44:43 tedu Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -583,15 +583,15 @@ zflash_write_strategy(struct zflash_softc *sc, struct buf *bp, } bp->b_resid = bp->b_bcount - sc->sc_flash.sc_flashdev->pagesize; - free(oob, M_DEVBUF); - free(buf, M_DEVBUF); + free(oob, M_DEVBUF, 0); + free(buf, M_DEVBUF, 0); return; bad: bp->b_flags |= B_ERROR; if (oob != NULL) - free(oob, M_DEVBUF); + free(oob, M_DEVBUF, 0); if (buf != NULL) - free(buf, M_DEVBUF); + free(buf, M_DEVBUF, 0); } int @@ -650,7 +650,7 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev) phyuse = (u_int16_t *)malloc(sp->sp_pblks * sizeof(u_int16_t), M_DEVBUF, M_NOWAIT); if (phyuse == NULL) { - free(sp, M_DEVBUF); + free(sp, M_DEVBUF, 0); return ENOMEM; } sp->sp_phyuse = phyuse; @@ -659,8 +659,8 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev) logmap = (u_int *)malloc(sp->sp_lblks * sizeof(u_int), M_DEVBUF, M_NOWAIT); if (logmap == NULL) { - free(phyuse, M_DEVBUF); - free(sp, M_DEVBUF); + free(phyuse, M_DEVBUF, 0); + free(sp, M_DEVBUF, 0); return ENOMEM; } sp->sp_logmap = logmap; @@ -747,9 +747,9 @@ zflash_safe_stop(struct zflash_softc *sc, dev_t dev) return; sp = sc->sc_safe[part]; - free(sp->sp_phyuse, M_DEVBUF); - free(sp->sp_logmap, M_DEVBUF); - free(sp, M_DEVBUF); + free(sp->sp_phyuse, M_DEVBUF, 0); + free(sp->sp_logmap, M_DEVBUF, 0); + free(sp, M_DEVBUF, 0); sc->sc_safe[part] = NULL; } diff --git a/sys/arch/zaurus/stand/zboot/diskprobe.c b/sys/arch/zaurus/stand/zboot/diskprobe.c index c776b372c75..9f04963575e 100644 --- a/sys/arch/zaurus/stand/zboot/diskprobe.c +++ b/sys/arch/zaurus/stand/zboot/diskprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskprobe.c,v 1.3 2006/10/13 00:00:55 krw Exp $ */ +/* $OpenBSD: diskprobe.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -74,7 +74,7 @@ hardprobe(void) bzero(dip, sizeof(*dip)); if (bios_getdiskinfo(order[i], &dip->bios_info) != NULL) { - free(dip, 0); + free(dip, 0, 0); continue; } |