mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
This commit is contained in:
parent
dd168dc2db
commit
f8e6c4256e
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: interrupt.c,v 1.32 2014/01/26 17:40:09 miod Exp $ */
|
||||
/* $OpenBSD: interrupt.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: interrupt.c,v 1.46 2000/06/03 20:47:36 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -586,7 +586,7 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&asi->softintr_mtx);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.32 2014/07/11 09:36:25 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -112,7 +112,7 @@ _bus_dmamap_destroy(t, map)
|
||||
bus_dmamap_t map;
|
||||
{
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sgmap_common.c,v 1.12 2014/06/14 23:11:20 jmatthew Exp $ */
|
||||
/* $OpenBSD: sgmap_common.c,v 1.13 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: sgmap_common.c,v 1.13 2000/06/29 09:02:57 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -187,7 +187,7 @@ void
|
||||
alpha_sgmap_dmamap_teardown(map)
|
||||
bus_dmamap_t map;
|
||||
{
|
||||
free(map->_dm_cookie, M_DEVBUF);
|
||||
free(map->_dm_cookie, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: shared_intr.c,v 1.18 2011/04/15 20:40:05 deraadt Exp $ */
|
||||
/* $OpenBSD: shared_intr.c,v 1.19 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
@ -196,7 +196,7 @@ alpha_shared_intr_disestablish(intr, cookie)
|
||||
*/
|
||||
evcount_detach(&ih->ih_count);
|
||||
TAILQ_REMOVE(&intr[num].intr_q, ih, ih_q);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: eisa_machdep.c,v 1.4 2013/07/17 13:57:24 martin Exp $ */
|
||||
/* $OpenBSD: eisa_machdep.c,v 1.5 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: eisa_machdep.c,v 1.1 2000/07/29 23:18:47 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -572,8 +572,8 @@ eisa_init(eisa_chipset_tag_t ec)
|
||||
}
|
||||
}
|
||||
|
||||
free(cdata, M_TEMP);
|
||||
free(data, M_TEMP);
|
||||
free(cdata, M_TEMP, 0);
|
||||
free(data, M_TEMP, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: isadma_bounce.c,v 1.10 2010/11/20 20:58:49 miod Exp $ */
|
||||
/* $OpenBSD: isadma_bounce.c,v 1.11 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: isadma_bounce.c,v 1.3 2000/06/29 09:02:57 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -171,7 +171,7 @@ isadma_bounce_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
||||
out:
|
||||
if (error) {
|
||||
if (map->_dm_cookie != NULL)
|
||||
free(map->_dm_cookie, M_DEVBUF);
|
||||
free(map->_dm_cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
return (error);
|
||||
@ -191,7 +191,7 @@ isadma_bounce_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
if (cookie->id_flags & ID_HAS_BOUNCE)
|
||||
isadma_bounce_free_bouncebuf(t, map);
|
||||
|
||||
free(cookie, M_DEVBUF);
|
||||
free(cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: disk.c,v 1.13 2013/11/12 01:37:40 krw Exp $ */
|
||||
/* $OpenBSD: disk.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: disk.c,v 1.6 1997/04/06 08:40:33 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -156,7 +156,7 @@ diskopen(f, ctlr, unit, part)
|
||||
|
||||
if (part >= lp->d_npartitions ||
|
||||
DL_GETPSIZE(&lp->d_partitions[part]) == 0) {
|
||||
bad: free(sc, sizeof(struct disk_softc));
|
||||
bad: free(sc, sizeof(struct disk_softc), 0);
|
||||
return (ENXIO);
|
||||
}
|
||||
return (0);
|
||||
@ -170,7 +170,7 @@ diskclose(f)
|
||||
sc = f->f_devdata;
|
||||
(void)prom_close(sc->sc_fd);
|
||||
|
||||
free(sc, sizeof(struct disk_softc));
|
||||
free(sc, sizeof(struct disk_softc), 0);
|
||||
f->f_devdata = NULL;
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: installboot.c,v 1.17 2013/06/11 16:42:06 deraadt Exp $ */
|
||||
/* $OpenBSD: installboot.c,v 1.18 2014/07/12 18:44:40 tedu Exp $ */
|
||||
/* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -258,7 +258,7 @@ loadprotoblocks(char *fname, long *size)
|
||||
}
|
||||
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
|
||||
warn("read: %s", fname);
|
||||
free(bp);
|
||||
free(bp, 0);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: setnetbootinfo.c,v 1.2 2003/05/11 19:41:09 deraadt Exp $ */
|
||||
/* $OpenBSD: setnetbootinfo.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: setnetbootinfo.c,v 1.5 1997/04/06 08:41:37 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -244,9 +244,9 @@ main(argc, argv)
|
||||
printf("closing %s...\n", outfilename);
|
||||
close(fd);
|
||||
|
||||
free(netbb);
|
||||
free(netbb, 0);
|
||||
if (outfile == NULL)
|
||||
free(outfilename);
|
||||
free(outfilename, 0);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: aesni.c,v 1.26 2014/01/18 23:17:24 mikeb Exp $ */
|
||||
/* $OpenBSD: aesni.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2003 Jason Wright
|
||||
* Copyright (c) 2003, 2004 Theo de Raadt
|
||||
@ -162,7 +162,7 @@ aesni_setup(void)
|
||||
|
||||
aesni_sc->sc_cid = crypto_get_driverid(0);
|
||||
if (aesni_sc->sc_cid < 0) {
|
||||
free(aesni_sc, M_DEVBUF);
|
||||
free(aesni_sc, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -352,12 +352,12 @@ aesni_freesession(u_int64_t tid)
|
||||
|
||||
if (ses->ses_ghash) {
|
||||
explicit_bzero(ses->ses_ghash, sizeof(GHASH_CTX));
|
||||
free(ses->ses_ghash, M_CRYPTO_DATA);
|
||||
free(ses->ses_ghash, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
|
||||
if (ses->ses_xts) {
|
||||
explicit_bzero(ses->ses_xts, sizeof(struct aesni_xts_ctx));
|
||||
free(ses->ses_xts, M_CRYPTO_DATA);
|
||||
free(ses->ses_xts, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
|
||||
if (ses->ses_swd) {
|
||||
@ -366,13 +366,13 @@ aesni_freesession(u_int64_t tid)
|
||||
|
||||
if (swd->sw_ictx) {
|
||||
explicit_bzero(swd->sw_ictx, axf->ctxsize);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
if (swd->sw_octx) {
|
||||
explicit_bzero(swd->sw_octx, axf->ctxsize);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
free(swd, M_CRYPTO_DATA);
|
||||
free(swd, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
|
||||
explicit_bzero(ses, sizeof (*ses));
|
||||
@ -411,7 +411,7 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd,
|
||||
if (crd->crd_len > aesni_sc->sc_buflen) {
|
||||
if (buf != NULL) {
|
||||
explicit_bzero(buf, aesni_sc->sc_buflen);
|
||||
free(buf, M_DEVBUF);
|
||||
free(buf, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
aesni_sc->sc_buflen = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.44 2014/07/11 09:36:25 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.45 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
@ -164,7 +164,7 @@ void
|
||||
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: est.c,v 1.32 2014/05/23 03:30:41 guenther Exp $ */
|
||||
/* $OpenBSD: est.c,v 1.33 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003 Michael Eriksson.
|
||||
* All rights reserved.
|
||||
@ -255,7 +255,7 @@ est_acpi_init()
|
||||
return acpilist;
|
||||
|
||||
notable:
|
||||
free(acpilist, M_DEVBUF);
|
||||
free(acpilist, M_DEVBUF, 0);
|
||||
acpilist = NULL;
|
||||
nolist:
|
||||
return NULL;
|
||||
@ -283,7 +283,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
|
||||
M_DEVBUF, M_NOWAIT)) == NULL) {
|
||||
printf("est_acpi_pss_changed: cannot allocate memory for new "
|
||||
"operating points");
|
||||
free(acpilist, M_DEVBUF);
|
||||
free(acpilist, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -294,8 +294,8 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
|
||||
needtran = 0;
|
||||
}
|
||||
|
||||
free(est_fqlist->table, M_DEVBUF);
|
||||
free(est_fqlist, M_DEVBUF);
|
||||
free(est_fqlist->table, M_DEVBUF, 0);
|
||||
free(est_fqlist, M_DEVBUF, 0);
|
||||
est_fqlist = acpilist;
|
||||
|
||||
if (needtran) {
|
||||
@ -383,7 +383,7 @@ est_init(struct cpu_info *ci)
|
||||
|
||||
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
|
||||
M_NOWAIT)) == NULL) {
|
||||
free(fake_fqlist, M_DEVBUF);
|
||||
free(fake_fqlist, M_DEVBUF, 0);
|
||||
printf("%s: EST: cannot allocate memory for fake "
|
||||
"table\n", cpu_device);
|
||||
return;
|
||||
@ -443,8 +443,8 @@ est_init(struct cpu_info *ci)
|
||||
return;
|
||||
|
||||
nospeedstep:
|
||||
free(est_fqlist->table, M_DEVBUF);
|
||||
free(est_fqlist, M_DEVBUF);
|
||||
free(est_fqlist->table, M_DEVBUF, 0);
|
||||
free(est_fqlist, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: intr.c,v 1.36 2014/03/29 18:09:28 guenther Exp $ */
|
||||
/* $OpenBSD: intr.c,v 1.37 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
@ -316,7 +316,7 @@ found:
|
||||
idtvec = idt_vec_alloc(APIC_LEVEL(level), IDT_INTR_HIGH);
|
||||
if (idtvec == 0) {
|
||||
simple_lock(&ci->ci_slock);
|
||||
free(ci->ci_isources[slot], M_DEVBUF);
|
||||
free(ci->ci_isources[slot], M_DEVBUF, 0);
|
||||
ci->ci_isources[slot] = NULL;
|
||||
simple_unlock(&ci->ci_slock);
|
||||
return EBUSY;
|
||||
@ -377,7 +377,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
|
||||
|
||||
if (source->is_handlers != NULL &&
|
||||
source->is_pic->pic_type != pic->pic_type) {
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
printf("intr_establish: can't share intr source between "
|
||||
"different PIC types (legacy_irq %d pin %d slot %d)\n",
|
||||
legacy_irq, pin, slot);
|
||||
@ -405,7 +405,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
|
||||
printf("intr_establish: pic %s pin %d: can't share "
|
||||
"type %d with %d\n", pic->pic_name, pin,
|
||||
source->is_type, type);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
@ -518,14 +518,14 @@ intr_disestablish(struct intrhand *ih)
|
||||
#endif
|
||||
|
||||
if (source->is_handlers == NULL) {
|
||||
free(source, M_DEVBUF);
|
||||
free(source, M_DEVBUF, 0);
|
||||
ci->ci_isources[ih->ih_slot] = NULL;
|
||||
if (pic != &i8259_pic)
|
||||
idt_vec_free(idtvec);
|
||||
}
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
|
||||
simple_unlock(&ci->ci_slock);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
|
||||
/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
|
||||
*
|
||||
@ -200,5 +200,5 @@ k1x_init(struct cpu_info *ci)
|
||||
setperf_prio = 1;
|
||||
return;
|
||||
}
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mem.c,v 1.16 2013/12/19 21:30:02 deraadt Exp $ */
|
||||
/* $OpenBSD: mem.c,v 1.17 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -295,7 +295,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
if (!error)
|
||||
error = copyout(md, mo->mo_desc,
|
||||
nd * sizeof(struct mem_range_desc));
|
||||
free(md, M_MEMDESC);
|
||||
free(md, M_MEMDESC, 0);
|
||||
} else {
|
||||
nd = mem_range_softc.mr_ndesc;
|
||||
}
|
||||
@ -309,7 +309,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
|
||||
if (error == 0)
|
||||
error = mem_range_attr_set(md, &mo->mo_arg[0]);
|
||||
free(md, M_MEMDESC);
|
||||
free(md, M_MEMDESC, 0);
|
||||
break;
|
||||
}
|
||||
return (error);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: powernow-k8.c,v 1.22 2010/04/20 22:05:41 tedu Exp $ */
|
||||
/* $OpenBSD: powernow-k8.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004 Martin Végiard.
|
||||
* Copyright (c) 2004-2005 Bruno Ducrot
|
||||
@ -383,7 +383,7 @@ k8pnow_acpi_pss_changed(struct acpicpu_pss * pss, int npss)
|
||||
if (needtran)
|
||||
k8pnow_transition(nstate, curs);
|
||||
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
k8pnow_current_state = nstate;
|
||||
}
|
||||
|
||||
@ -513,5 +513,5 @@ k8_powernow_init(struct cpu_info *ci)
|
||||
setperf_prio = 1;
|
||||
return;
|
||||
}
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.5 2009/04/19 19:13:57 oga Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&si->softintr_lock);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: via.c,v 1.15 2014/03/29 18:09:28 guenther Exp $ */
|
||||
/* $OpenBSD: via.c,v 1.16 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -118,7 +118,7 @@ viac3_crypto_setup(void)
|
||||
|
||||
vc3_sc->sc_cid = crypto_get_driverid(0);
|
||||
if (vc3_sc->sc_cid < 0) {
|
||||
free(vc3_sc, M_DEVBUF);
|
||||
free(vc3_sc, M_DEVBUF, 0);
|
||||
return; /* YYY bitch? */
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri)
|
||||
return (ENOMEM);
|
||||
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
|
||||
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
|
||||
free(sc->sc_sessions, M_DEVBUF);
|
||||
free(sc->sc_sessions, M_DEVBUF, 0);
|
||||
sc->sc_sessions = ses;
|
||||
ses = &sc->sc_sessions[sesn];
|
||||
sc->sc_nsessions++;
|
||||
@ -302,13 +302,13 @@ viac3_crypto_freesession(u_int64_t tid)
|
||||
|
||||
if (swd->sw_ictx) {
|
||||
explicit_bzero(swd->sw_ictx, axf->ctxsize);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
if (swd->sw_octx) {
|
||||
explicit_bzero(swd->sw_octx, axf->ctxsize);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
free(swd, M_CRYPTO_DATA);
|
||||
free(swd, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
|
||||
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
|
||||
@ -429,7 +429,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
|
||||
|
||||
if (sc->op_buf != NULL) {
|
||||
explicit_bzero(sc->op_buf, crd->crd_len);
|
||||
free(sc->op_buf, M_DEVBUF);
|
||||
free(sc->op_buf, M_DEVBUF, 0);
|
||||
sc->op_buf = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: isa_machdep.c,v 1.22 2010/11/20 20:58:51 miod Exp $ */
|
||||
/* $OpenBSD: isa_machdep.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
|
||||
|
||||
#define ISA_DMA_STATS
|
||||
@ -452,7 +452,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
||||
out:
|
||||
if (error) {
|
||||
if (map->_dm_cookie != NULL)
|
||||
free(map->_dm_cookie, M_DEVBUF);
|
||||
free(map->_dm_cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
return (error);
|
||||
@ -472,7 +472,7 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
if (cookie->id_flags & ID_HAS_BOUNCE)
|
||||
_isa_dma_free_bouncebuf(t, map);
|
||||
|
||||
free(cookie, M_DEVBUF);
|
||||
free(cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: agp_machdep.c,v 1.11 2014/04/01 09:05:03 mpi Exp $ */
|
||||
/* $OpenBSD: agp_machdep.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
|
||||
@ -90,7 +90,7 @@ agp_init_map(bus_space_tag_t tag, bus_addr_t address, bus_size_t size,
|
||||
map->size = size;
|
||||
|
||||
if ((err = bus_space_map(tag, address, size, flags, &map->bsh)) != 0) {
|
||||
free(map, M_AGP);
|
||||
free(map, M_AGP, 0);
|
||||
return (err);
|
||||
}
|
||||
*mapp = map;
|
||||
@ -101,7 +101,7 @@ void
|
||||
agp_destroy_map(struct agp_map *map)
|
||||
{
|
||||
bus_space_unmap(map->bst, map->bsh, map->size);
|
||||
free(map, M_AGP);
|
||||
free(map, M_AGP, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
|
||||
/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
@ -142,7 +142,7 @@ vga_post_init(int bus, int device, int function)
|
||||
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
|
||||
if (err) {
|
||||
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
|
||||
free(sc, M_DEVBUF);
|
||||
free(sc, M_DEVBUF, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ vga_post_free(struct vga_post *sc)
|
||||
pmap_kremove(sc->sys_image, 1024 * 1024);
|
||||
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
|
||||
pmap_update(pmap_kernel());
|
||||
free(sc, M_DEVBUF);
|
||||
free(sc, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
#ifdef DDB
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: diskprobe.c,v 1.13 2013/11/05 00:51:58 krw Exp $ */
|
||||
/* $OpenBSD: diskprobe.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Tobias Weingartner
|
||||
@ -79,7 +79,7 @@ floppyprobe(void)
|
||||
if (debug)
|
||||
printf(" <!fd%u>", i);
|
||||
#endif
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ hardprobe(void)
|
||||
if (debug)
|
||||
printf(" <!hd%u>", i&0x7f);
|
||||
#endif
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ cdprobe(void)
|
||||
#if 0
|
||||
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
|
||||
printf(" <!cd0>"); /* XXX */
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
|
||||
/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
|
||||
@ -315,7 +315,7 @@ srprobe(void)
|
||||
}
|
||||
|
||||
explicit_bzero(md, SR_META_SIZE * 512);
|
||||
free(md, 0);
|
||||
free(md, 0, 0);
|
||||
}
|
||||
|
||||
int
|
||||
@ -477,18 +477,18 @@ sr_clear_keys(void)
|
||||
continue;
|
||||
if (bv->sbv_keys != NULL) {
|
||||
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
|
||||
free(bv->sbv_keys, 0);
|
||||
free(bv->sbv_keys, 0, 0);
|
||||
bv->sbv_keys = NULL;
|
||||
}
|
||||
if (bv->sbv_maskkey != NULL) {
|
||||
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
|
||||
free(bv->sbv_maskkey, 0);
|
||||
free(bv->sbv_maskkey, 0, 0);
|
||||
bv->sbv_maskkey = NULL;
|
||||
}
|
||||
}
|
||||
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
|
||||
explicit_bzero(kd, sizeof(*kd));
|
||||
free(kd, 0);
|
||||
free(kd, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ done:
|
||||
|
||||
if (keys != NULL && rv != 0) {
|
||||
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
|
||||
free(keys, 0);
|
||||
free(keys, 0, 0);
|
||||
}
|
||||
|
||||
return (rv);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.25 2014/07/11 09:36:25 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */
|
||||
|
||||
/*-
|
||||
@ -173,7 +173,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
map->_dm_buftype = ARM32_BUFTYPE_INVALID;
|
||||
map->_dm_proc = NULL;
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pmap7.c,v 1.14 2014/05/08 21:17:00 miod Exp $ */
|
||||
/* $OpenBSD: pmap7.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
|
||||
|
||||
/*
|
||||
@ -758,7 +758,7 @@ pmap_free_l1(pmap_t pm)
|
||||
/* free backing va */
|
||||
uvm_km_free(kernel_map, (vaddr_t)l1->l1_kva, L1_TABLE_SIZE);
|
||||
|
||||
free(l1, M_VMPMAP);
|
||||
free(l1, M_VMPMAP, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.7 2010/12/21 14:56:23 claudio Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&siq->siq_mtx);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: undefined.c,v 1.5 2011/09/20 22:02:11 miod Exp $ */
|
||||
/* $OpenBSD: undefined.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
@ -98,7 +98,7 @@ remove_coproc_handler(void *cookie)
|
||||
struct undefined_handler *uh = cookie;
|
||||
|
||||
LIST_REMOVE(uh, uh_link);
|
||||
free(uh, M_TEMP);
|
||||
free(uh, M_TEMP, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ampintc.c,v 1.2 2013/09/06 21:40:28 patrick Exp $ */
|
||||
/* $OpenBSD: ampintc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
|
||||
*
|
||||
@ -561,7 +561,7 @@ ampintc_intr_disestablish(void *cookie)
|
||||
TAILQ_REMOVE(&sc->sc_ampintc_handler[irqno].iq_list, ih, ih_list);
|
||||
if (ih->ih_name != NULL)
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
restore_interrupts(psw);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pxa2x0_gpio.c,v 1.23 2014/05/08 21:17:00 miod Exp $ */
|
||||
/* $OpenBSD: pxa2x0_gpio.c,v 1.24 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -330,7 +330,7 @@ pxa2x0_gpio_intr_disestablish(void *cookie)
|
||||
#endif /* PXAGPIO_HAS_GPION_INTRS */
|
||||
}
|
||||
|
||||
free(gh, M_DEVBUF);
|
||||
free(gh, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
#ifdef PXAGPIO_HAS_GPION_INTRS
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pxa2x0_i2s.c,v 1.7 2006/04/04 11:45:40 pascoe Exp $ */
|
||||
/* $OpenBSD: pxa2x0_i2s.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Christopher Pascoe <pascoe@openbsd.org>
|
||||
@ -225,7 +225,7 @@ fail_create:
|
||||
fail_map:
|
||||
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
|
||||
fail_alloc:
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ pxa2x0_i2s_freem(void *hdl, void *ptr, int type)
|
||||
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
|
||||
|
||||
*pp = p->next;
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pxa2x0_intr.c,v 1.25 2014/05/08 21:17:00 miod Exp $ */
|
||||
/* $OpenBSD: pxa2x0_intr.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -590,7 +590,7 @@ pxa2x0_intr_disestablish(void *cookie)
|
||||
psw = disable_interrupts(I32_bit);
|
||||
TAILQ_REMOVE(&handler[irqno].list, ih, ih_list);
|
||||
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
|
||||
pxa2x0_update_intr_masks();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pxa2x0_lcd.c,v 1.25 2013/10/21 10:36:09 miod Exp $ */
|
||||
/* $OpenBSD: pxa2x0_lcd.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */
|
||||
|
||||
/*
|
||||
@ -703,7 +703,7 @@ pxa2x0_lcd_alloc_screen(void *v, const struct wsscreen_descr *_type,
|
||||
|
||||
error = pxa2x0_lcd_new_screen(sc, scr, type->depth);
|
||||
if (error != 0) {
|
||||
free(scr, M_DEVBUF);
|
||||
free(scr, M_DEVBUF, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ pxa2x0_lcd_free_screen(void *v, void *cookie)
|
||||
if (scr->nsegs > 0)
|
||||
bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs);
|
||||
|
||||
free(scr, M_DEVBUF);
|
||||
free(scr, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: intc.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */
|
||||
/* $OpenBSD: intc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
|
||||
*
|
||||
@ -380,7 +380,7 @@ intc_intr_disestablish(void *cookie)
|
||||
TAILQ_REMOVE(&intc_handler[irqno].iq_list, ih, ih_list);
|
||||
if (ih->ih_name != NULL)
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
restore_interrupts(psw);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: omdisplay.c,v 1.4 2013/12/11 12:51:51 naddy Exp $ */
|
||||
/* $OpenBSD: omdisplay.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
|
||||
*
|
||||
@ -1157,7 +1157,7 @@ omdisplay_alloc_screen(void *v, const struct wsscreen_descr *_type,
|
||||
|
||||
error = omdisplay_new_screen(sc, scr, type->depth);
|
||||
if (error != 0) {
|
||||
free(scr, M_DEVBUF);
|
||||
free(scr, M_DEVBUF, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ omdisplay_free_screen(void *v, void *cookie)
|
||||
if (scr->nsegs > 0)
|
||||
bus_dmamem_free(sc->sc_dma_tag, scr->segs, scr->nsegs);
|
||||
|
||||
free(scr, M_DEVBUF);
|
||||
free(scr, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: omgpio.c,v 1.3 2013/11/20 13:32:40 rapha Exp $ */
|
||||
/* $OpenBSD: omgpio.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
|
||||
*
|
||||
@ -662,7 +662,7 @@ omgpio_intr_disestablish(struct omgpio_softc *sc, void *cookie)
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
|
||||
omgpio_intr_level(gpio, IST_NONE);
|
||||
omgpio_intr_mask(gpio);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: a1xintc.c,v 1.3 2013/11/06 19:03:07 syl Exp $ */
|
||||
/* $OpenBSD: a1xintc.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
|
||||
* Copyright (c) 2013 Artturi Alm
|
||||
@ -417,7 +417,7 @@ intc_intr_disestablish(void *cookie)
|
||||
if (ih->ih_name != NULL)
|
||||
evcount_detach(&ih->ih_count);
|
||||
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
|
||||
er = bus_space_read_4(intc_iot, intc_ioh,
|
||||
INTC_ENABLE_REG(IRQ2REG32(irq)));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.6 2014/07/11 09:36:26 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
|
||||
|
||||
/*-
|
||||
@ -113,7 +113,7 @@ bus_dmamap_destroy(t, map)
|
||||
bus_dmamap_t map;
|
||||
{
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: disksubr.c,v 1.58 2013/10/19 09:32:13 krw Exp $ */
|
||||
/* $OpenBSD: disksubr.c,v 1.59 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Miodrag Vallat.
|
||||
@ -450,7 +450,7 @@ readvditlabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
|
||||
}
|
||||
|
||||
done:
|
||||
free(vdit_storage, M_DEVBUF);
|
||||
free(vdit_storage, M_DEVBUF, 0);
|
||||
if (sbp != NULL) {
|
||||
sbp->b_flags |= B_INVAL;
|
||||
brelse(sbp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dma.c,v 1.1 2013/10/23 10:07:14 miod Exp $ */
|
||||
/* $OpenBSD: dma.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Miodrag Vallat.
|
||||
@ -139,7 +139,7 @@ dma_intr(void *v)
|
||||
if (req->cbdone != NULL)
|
||||
(*req->cbdone)(req->cbarg);
|
||||
|
||||
free(req, M_DEVBUF);
|
||||
free(req, M_DEVBUF, 0);
|
||||
} else {
|
||||
req->mem += req->lastcnt;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vme.c,v 1.13 2014/05/08 22:17:33 miod Exp $ */
|
||||
/* $OpenBSD: vme.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
|
||||
*
|
||||
@ -836,7 +836,7 @@ vmebus_get_bst(struct device *vsc, u_int aspace, u_int dspace,
|
||||
void
|
||||
vmebus_release_bst(struct device *vsc, bus_space_tag_t b)
|
||||
{
|
||||
free((void *)b, M_DEVBUF);
|
||||
free((void *)b, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: a2coff.c,v 1.11 2014/05/31 21:04:34 miod Exp $ */
|
||||
/* $OpenBSD: a2coff.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Miodrag Vallat
|
||||
*
|
||||
@ -324,7 +324,7 @@ convert_elf(const char *infile, int infd, int outfd, Elf_Ehdr *ehdr)
|
||||
last = n;
|
||||
}
|
||||
|
||||
free(phdr);
|
||||
free(phdr, 0);
|
||||
|
||||
/*
|
||||
* Fill ``data'' section.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: oaic.c,v 1.1 2013/10/16 16:59:34 miod Exp $ */
|
||||
/* $OpenBSD: oaic.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, 2013 Miodrag Vallat.
|
||||
@ -225,7 +225,7 @@ oaic_attach(uint32_t addr, int id, int lun)
|
||||
void
|
||||
oaic_detach(void *cookie)
|
||||
{
|
||||
free(cookie, sizeof(struct aic6250_softc));
|
||||
free(cookie, sizeof(struct aic6250_softc), 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: oosiop.c,v 1.4 2013/10/16 16:59:34 miod Exp $ */
|
||||
/* $OpenBSD: oosiop.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp */
|
||||
/* OpenBSD: oosiopvar.h,v 1.5 2011/04/03 12:42:36 krw Exp */
|
||||
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
|
||||
@ -214,8 +214,8 @@ oosiop_detach(void *cookie)
|
||||
{
|
||||
struct oosiop_softc *sc = cookie;
|
||||
|
||||
free(sc->sc_scr, sizeof(oosiop_script));
|
||||
free(sc, sizeof *sc);
|
||||
free(sc->sc_scr, sizeof(oosiop_script), 0);
|
||||
free(sc, sizeof *sc, 0);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: scsi.c,v 1.2 2013/10/16 16:59:34 miod Exp $ */
|
||||
/* $OpenBSD: scsi.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Miodrag Vallat.
|
||||
@ -93,7 +93,7 @@ scsi_initialize(const char *ctrlname, int ctrl, int unit, int lun, int part)
|
||||
|
||||
done:
|
||||
if (priv->scsicookie == NULL) {
|
||||
free(priv, sizeof(struct scsi_private));
|
||||
free(priv, sizeof(struct scsi_private), 0);
|
||||
priv = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sd.c,v 1.5 2013/10/16 16:59:34 miod Exp $ */
|
||||
/* $OpenBSD: sd.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Miodrag Vallat.
|
||||
@ -92,7 +92,7 @@ sdclose(struct open_file *f)
|
||||
priv = (struct scsi_private *)f->f_devdata;
|
||||
if (priv->scsicookie != NULL)
|
||||
(*priv->scsidetach)(priv->scsicookie);
|
||||
free(priv, sizeof(struct scsi_private));
|
||||
free(priv, sizeof(struct scsi_private), 0);
|
||||
f->f_devdata = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vdmtool.c,v 1.2 2013/10/01 22:24:53 jmc Exp $ */
|
||||
/* $OpenBSD: vdmtool.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Miodrag Vallat.
|
||||
@ -534,7 +534,7 @@ read_vdit(int fd, uint32_t secno, size_t *vditsize)
|
||||
curbuf = append_vdit_portion(fd, secno, curbuf, sector,
|
||||
first ? VDIT_BLOCK_HEAD_BE : VDIT_PORTION_HEADER_BLOCK);
|
||||
if (curbuf == NULL) {
|
||||
free(buf);
|
||||
free(buf, 0);
|
||||
return NULL;
|
||||
}
|
||||
first = 0;
|
||||
@ -606,10 +606,10 @@ report(int fd)
|
||||
}
|
||||
if (memcmp(vdit, vdit2, vditsize) != 0)
|
||||
printf("VDIT and backup VDIT differ!\n");
|
||||
free(vdit2);
|
||||
free(vdit2, 0);
|
||||
}
|
||||
|
||||
free(vdit);
|
||||
free(vdit, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */
|
||||
/* $OpenBSD: apic.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Michael Shalayeff
|
||||
@ -171,13 +171,13 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
|
||||
|
||||
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
|
||||
if (aiv == NULL) {
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
|
||||
if (!cnt) {
|
||||
free(aiv, M_DEVBUF);
|
||||
free(aiv, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: astro.c,v 1.14 2014/02/08 20:41:48 kettenis Exp $ */
|
||||
/* $OpenBSD: astro.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Mark Kettenis
|
||||
@ -620,7 +620,7 @@ iommu_iomap_destroy(struct iommu_map_state *ims)
|
||||
ims->ims_map.ipm_pagecnt);
|
||||
#endif
|
||||
|
||||
free(ims, M_DEVBUF);
|
||||
free(ims, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: harmony.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
|
||||
/* $OpenBSD: harmony.c,v 1.29 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
|
||||
@ -996,7 +996,7 @@ fail3:
|
||||
fail2:
|
||||
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
|
||||
fail1:
|
||||
free(d, pool);
|
||||
free(d, pool, 0);
|
||||
fail:
|
||||
return (NULL);
|
||||
}
|
||||
@ -1014,7 +1014,7 @@ harmony_freem(void *vsc, void *ptr, int pool)
|
||||
bus_dmamem_unmap(sc->sc_dmat, d->d_kva, d->d_size);
|
||||
bus_dmamem_free(sc->sc_dmat, &d->d_seg, 1);
|
||||
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
|
||||
free(d, pool);
|
||||
free(d, pool, 0);
|
||||
return;
|
||||
}
|
||||
printf("%s: free rogue pointer\n", sc->sc_dv.dv_xname);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: intr.c,v 1.43 2014/07/08 17:19:24 deraadt Exp $ */
|
||||
/* $OpenBSD: intr.c,v 1.44 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002-2004 Michael Shalayeff
|
||||
@ -163,7 +163,7 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
|
||||
iv = &ivb[irq];
|
||||
if (iv->handler) {
|
||||
if (!pv->share) {
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
} else {
|
||||
iv = pv->share;
|
||||
@ -224,10 +224,10 @@ cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg,
|
||||
intr_more += 2 * CPU_NINTS;
|
||||
for (ev = iv->next + CPU_NINTS; ev < intr_more; ev++)
|
||||
ev->share = iv->share, iv->share = ev;
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
iv->cnt = NULL;
|
||||
} else if (name == NULL) {
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
iv->cnt = NULL;
|
||||
} else
|
||||
evcount_attach(cnt, name, NULL);
|
||||
@ -360,7 +360,7 @@ softintr_disestablish(void *cookie)
|
||||
iv->handler = nv->handler;
|
||||
iv->arg = nv->arg;
|
||||
iv->next = nv->next;
|
||||
free(nv, M_DEVBUF);
|
||||
free(nv, M_DEVBUF, 0);
|
||||
return;
|
||||
} else {
|
||||
iv->handler = NULL;
|
||||
@ -372,7 +372,7 @@ softintr_disestablish(void *cookie)
|
||||
for (iv = &intr_table[irq]; iv; iv = iv->next) {
|
||||
if (iv->next == cookie) {
|
||||
iv->next = iv->next->next;
|
||||
free(cookie, M_DEVBUF);
|
||||
free(cookie, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mainbus.c,v 1.84 2014/05/08 21:32:45 miod Exp $ */
|
||||
/* $OpenBSD: mainbus.c,v 1.85 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2004 Michael Shalayeff
|
||||
@ -760,7 +760,7 @@ mbus_dmamap_destroy(void *v, bus_dmamap_t map)
|
||||
if (map->dm_mapsize != 0)
|
||||
mbus_dmamap_unload(v, map);
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: lf.c,v 1.8 2013/03/24 19:20:35 deraadt Exp $ */
|
||||
/* $OpenBSD: lf.c,v 1.9 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2004 Michael Shalayeff
|
||||
@ -47,7 +47,7 @@ lfopen(struct open_file *f, ...)
|
||||
int
|
||||
lfclose(struct open_file *f)
|
||||
{
|
||||
free(f->f_devdata, sizeof(struct hppa_dev));
|
||||
free(f->f_devdata, sizeof(struct hppa_dev), 0);
|
||||
f->f_devdata = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: apic.c,v 1.6 2011/04/07 14:22:26 jsing Exp $ */
|
||||
/* $OpenBSD: apic.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Michael Shalayeff
|
||||
@ -173,7 +173,7 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
|
||||
|
||||
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
|
||||
if (aiv == NULL) {
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
|
||||
if (apic_intr_list[irq]) {
|
||||
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
|
||||
if (!cnt) {
|
||||
free(aiv, M_DEVBUF);
|
||||
free(aiv, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: astro.c,v 1.5 2011/04/07 15:30:15 miod Exp $ */
|
||||
/* $OpenBSD: astro.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Mark Kettenis
|
||||
@ -614,7 +614,7 @@ iommu_iomap_destroy(struct iommu_map_state *ims)
|
||||
ims->ims_map.ipm_pagecnt);
|
||||
#endif
|
||||
|
||||
free(ims, M_DEVBUF);
|
||||
free(ims, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: autoconf.c,v 1.17 2013/10/04 18:46:07 kettenis Exp $ */
|
||||
/* $OpenBSD: autoconf.c,v 1.18 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2005 Michael Shalayeff
|
||||
@ -387,13 +387,13 @@ printf("num %ld ", pdc_pat_io_num.num);
|
||||
if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PAT_IO,
|
||||
PDC_PAT_IO_GET_PCI_RT, rt, cell))) {
|
||||
printf("irt fetch error %d\n", err);
|
||||
free(rt, M_DEVBUF);
|
||||
free(rt, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
} else if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX,
|
||||
PDC_PCI_GET_INT_TBL, &pdc_pat_io_num, cpu_gethpa(0), pdc_rt))) {
|
||||
printf("irt fetch error %d\n", err);
|
||||
free(rt, M_DEVBUF);
|
||||
free(rt, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
bcopy(pdc_rt, rt, num * sizeof(*rt));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: intr.c,v 1.9 2014/07/08 17:19:24 deraadt Exp $ */
|
||||
/* $OpenBSD: intr.c,v 1.10 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002-2004 Michael Shalayeff
|
||||
@ -132,7 +132,7 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
|
||||
iv = &ivb[irq];
|
||||
if (iv->handler) {
|
||||
if (!pv->share) {
|
||||
free(cnt, M_DEVBUF);
|
||||
free(cnt, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
} else {
|
||||
iv = pv->share;
|
||||
@ -308,7 +308,7 @@ softintr_disestablish(void *cookie)
|
||||
iv->handler = nv->handler;
|
||||
iv->arg = nv->arg;
|
||||
iv->next = nv->next;
|
||||
free(nv, M_DEVBUF);
|
||||
free(nv, M_DEVBUF, 0);
|
||||
return;
|
||||
} else {
|
||||
iv->handler = NULL;
|
||||
@ -320,7 +320,7 @@ softintr_disestablish(void *cookie)
|
||||
for (iv = &intr_table[irq]; iv; iv = iv->next) {
|
||||
if (iv->next == cookie) {
|
||||
iv->next = iv->next->next;
|
||||
free(cookie, M_DEVBUF);
|
||||
free(cookie, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mainbus.c,v 1.14 2014/04/08 09:34:23 mpi Exp $ */
|
||||
/* $OpenBSD: mainbus.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Michael Shalayeff
|
||||
@ -334,7 +334,7 @@ mbus_dmamap_destroy(void *v, bus_dmamap_t map)
|
||||
if (map->dm_mapsize != 0)
|
||||
mbus_dmamap_unload(v, map);
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: lf.c,v 1.2 2013/03/24 19:20:35 deraadt Exp $ */
|
||||
/* $OpenBSD: lf.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Michael Shalayeff
|
||||
@ -38,7 +38,7 @@ lfopen(struct open_file *f, ...)
|
||||
int
|
||||
lfclose(struct open_file *f)
|
||||
{
|
||||
free(f->f_devdata, sizeof(struct hppa_dev));
|
||||
free(f->f_devdata, sizeof(struct hppa_dev), 0);
|
||||
f->f_devdata = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.31 2014/07/11 14:41:00 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -132,7 +132,7 @@ void
|
||||
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: esm.c,v 1.54 2013/07/04 16:55:18 sf Exp $ */
|
||||
/* $OpenBSD: esm.c,v 1.55 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
|
||||
@ -875,7 +875,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
|
||||
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
|
||||
M_NOWAIT|M_ZERO);
|
||||
if (s == NULL) {
|
||||
free(es, M_DEVBUF);
|
||||
free(es, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -893,7 +893,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
|
||||
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
|
||||
M_NOWAIT|M_ZERO);
|
||||
if (s == NULL) {
|
||||
free(es, M_DEVBUF);
|
||||
free(es, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
|
||||
case ESM_S_VOLTS:
|
||||
case ESM_S_VOLTSx10:
|
||||
if (esm_thresholds(sc, devmap, es) != 0) {
|
||||
free(es, M_DEVBUF);
|
||||
free(es, M_DEVBUF, 0);
|
||||
continue;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
@ -919,7 +919,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
|
||||
s = malloc(sizeof(struct ksensor), M_DEVBUF,
|
||||
M_NOWAIT|M_ZERO);
|
||||
if (s == NULL) {
|
||||
free(es, M_DEVBUF);
|
||||
free(es, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: est.c,v 1.42 2014/05/23 03:30:41 guenther Exp $ */
|
||||
/* $OpenBSD: est.c,v 1.43 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003 Michael Eriksson.
|
||||
* All rights reserved.
|
||||
@ -998,7 +998,7 @@ est_acpi_init()
|
||||
return acpilist;
|
||||
|
||||
notable:
|
||||
free(acpilist, M_DEVBUF);
|
||||
free(acpilist, M_DEVBUF, 0);
|
||||
acpilist = NULL;
|
||||
nolist:
|
||||
return NULL;
|
||||
@ -1026,7 +1026,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
|
||||
M_DEVBUF, M_NOWAIT)) == NULL) {
|
||||
printf("est_acpi_pss_changed: cannot allocate memory for new "
|
||||
"operating points");
|
||||
free(acpilist, M_DEVBUF);
|
||||
free(acpilist, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1037,8 +1037,8 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
|
||||
needtran = 0;
|
||||
}
|
||||
|
||||
free(est_fqlist->table, M_DEVBUF);
|
||||
free(est_fqlist, M_DEVBUF);
|
||||
free(est_fqlist->table, M_DEVBUF, 0);
|
||||
free(est_fqlist, M_DEVBUF, 0);
|
||||
est_fqlist = acpilist;
|
||||
|
||||
if (needtran) {
|
||||
@ -1142,7 +1142,7 @@ est_init(struct cpu_info *ci, int vendor)
|
||||
|
||||
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
|
||||
M_NOWAIT)) == NULL) {
|
||||
free(fake_fqlist, M_DEVBUF);
|
||||
free(fake_fqlist, M_DEVBUF, 0);
|
||||
printf("%s: EST: cannot allocate memory for fake "
|
||||
"table\n", cpu_device);
|
||||
return;
|
||||
@ -1206,8 +1206,8 @@ nospeedstep:
|
||||
* While est_fqlist can point into the static est_cpus[],
|
||||
* it can't fail in that case and therefore can't reach here.
|
||||
*/
|
||||
free(est_fqlist->table, M_DEVBUF);
|
||||
free(est_fqlist, M_DEVBUF);
|
||||
free(est_fqlist->table, M_DEVBUF, 0);
|
||||
free(est_fqlist, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ioapic.c,v 1.30 2013/10/01 20:22:11 sf Exp $ */
|
||||
/* $OpenBSD: ioapic.c,v 1.31 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
@ -709,7 +709,7 @@ apic_intr_establish(int irq, int type, int level, int (*ih_fun)(void *),
|
||||
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
|
||||
ih_what, isa_intr_typename(pin->ip_type),
|
||||
isa_intr_typename(type), intr);*/
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
break;
|
||||
@ -823,7 +823,7 @@ apic_intr_disestablish(void *arg)
|
||||
apic_vectorset(sc, intr, minlevel, maxlevel);
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
|
||||
/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
|
||||
*
|
||||
@ -200,5 +200,5 @@ k1x_init(struct cpu_info *ci)
|
||||
setperf_prio = 1;
|
||||
return;
|
||||
}
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
|
||||
/* $OpenBSD: mem.c,v 1.38 2013/12/19 21:30:02 deraadt Exp $ */
|
||||
/* $OpenBSD: mem.c,v 1.39 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -296,7 +296,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
if (!error)
|
||||
error = copyout(md, mo->mo_desc,
|
||||
nd * sizeof(struct mem_range_desc));
|
||||
free(md, M_MEMDESC);
|
||||
free(md, M_MEMDESC, 0);
|
||||
} else {
|
||||
nd = mem_range_softc.mr_ndesc;
|
||||
}
|
||||
@ -310,7 +310,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
|
||||
if (error == 0)
|
||||
error = mem_range_attr_set(md, &mo->mo_arg[0]);
|
||||
free(md, M_MEMDESC);
|
||||
free(md, M_MEMDESC, 0);
|
||||
break;
|
||||
}
|
||||
return (error);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: powernow-k7.c,v 1.34 2010/04/20 22:05:41 tedu Exp $ */
|
||||
/* $OpenBSD: powernow-k7.c,v 1.35 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Martin Végiard.
|
||||
@ -448,5 +448,5 @@ k7_powernow_init(void)
|
||||
setperf_prio = 1;
|
||||
return;
|
||||
}
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: powernow-k8.c,v 1.26 2010/04/20 22:05:41 tedu Exp $ */
|
||||
/* $OpenBSD: powernow-k8.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Martin Végiard.
|
||||
@ -512,5 +512,5 @@ k8_powernow_init(void)
|
||||
setperf_prio = 1;
|
||||
return;
|
||||
}
|
||||
free(cstate, M_DEVBUF);
|
||||
free(cstate, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.4 2009/04/19 19:13:57 oga Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&si->softintr_lock);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sys_machdep.c,v 1.31 2011/11/07 15:41:33 guenther Exp $ */
|
||||
/* $OpenBSD: sys_machdep.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: sys_machdep.c,v 1.28 1996/05/03 19:42:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
@ -126,7 +126,7 @@ i386_get_ldt(struct proc *p, void *args, register_t *retval)
|
||||
|
||||
if (ua.start > nldt) {
|
||||
simple_unlock(&pmap->pm_lock);
|
||||
free(cp, M_TEMP);
|
||||
free(cp, M_TEMP, 0);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ i386_get_ldt(struct proc *p, void *args, register_t *retval)
|
||||
if (error == 0)
|
||||
*retval = num;
|
||||
|
||||
free(cp, M_TEMP);
|
||||
free(cp, M_TEMP, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ copy:
|
||||
*retval = ua.start;
|
||||
|
||||
out:
|
||||
free(descv, M_TEMP);
|
||||
free(descv, M_TEMP, 0);
|
||||
return (error);
|
||||
}
|
||||
#endif /* USER_LDT */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: via.c,v 1.31 2014/03/29 18:09:29 guenther Exp $ */
|
||||
/* $OpenBSD: via.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -120,7 +120,7 @@ viac3_crypto_setup(void)
|
||||
|
||||
vc3_sc->sc_cid = crypto_get_driverid(0);
|
||||
if (vc3_sc->sc_cid < 0) {
|
||||
free(vc3_sc, M_DEVBUF);
|
||||
free(vc3_sc, M_DEVBUF, 0);
|
||||
return; /* YYY bitch? */
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri)
|
||||
return (ENOMEM);
|
||||
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
|
||||
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
|
||||
free(sc->sc_sessions, M_DEVBUF);
|
||||
free(sc->sc_sessions, M_DEVBUF, 0);
|
||||
sc->sc_sessions = ses;
|
||||
ses = &sc->sc_sessions[sesn];
|
||||
sc->sc_nsessions++;
|
||||
@ -304,13 +304,13 @@ viac3_crypto_freesession(u_int64_t tid)
|
||||
|
||||
if (swd->sw_ictx) {
|
||||
explicit_bzero(swd->sw_ictx, axf->ctxsize);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
if (swd->sw_octx) {
|
||||
explicit_bzero(swd->sw_octx, axf->ctxsize);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
free(swd, M_CRYPTO_DATA);
|
||||
free(swd, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
|
||||
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
|
||||
@ -431,7 +431,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
|
||||
|
||||
if (sc->op_buf != NULL) {
|
||||
explicit_bzero(sc->op_buf, crd->crd_len);
|
||||
free(sc->op_buf, M_DEVBUF);
|
||||
free(sc->op_buf, M_DEVBUF, 0);
|
||||
sc->op_buf = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: isa_machdep.c,v 1.75 2013/07/14 18:22:08 kettenis Exp $ */
|
||||
/* $OpenBSD: isa_machdep.c,v 1.76 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -513,7 +513,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
|
||||
|
||||
if (!LEGAL_IRQ(irq) || type == IST_NONE) {
|
||||
printf("%s: isa_intr_establish: bogus irq or type\n", ih_what);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
switch (intrtype[irq]) {
|
||||
@ -531,7 +531,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
|
||||
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
|
||||
ih_what, isa_intr_typename(intrtype[irq]),
|
||||
isa_intr_typename(type), irq);*/
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
return (NULL);
|
||||
}
|
||||
break;
|
||||
@ -601,7 +601,7 @@ isa_intr_disestablish(isa_chipset_tag_t ic, void *arg)
|
||||
else
|
||||
panic("intr_disestablish: handler not registered");
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
|
||||
intr_calculatemasks();
|
||||
|
||||
@ -725,7 +725,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
||||
out:
|
||||
if (error) {
|
||||
if (map->_dm_cookie != NULL)
|
||||
free(map->_dm_cookie, M_DEVBUF);
|
||||
free(map->_dm_cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
return (error);
|
||||
@ -745,7 +745,7 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
if (cookie->id_flags & ID_HAS_BOUNCE)
|
||||
_isa_dma_free_bouncebuf(t, map);
|
||||
|
||||
free(cookie, M_DEVBUF);
|
||||
free(cookie, M_DEVBUF, 0);
|
||||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: agp_machdep.c,v 1.17 2014/04/01 09:05:03 mpi Exp $ */
|
||||
/* $OpenBSD: agp_machdep.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
|
||||
@ -144,7 +144,7 @@ agp_destroy_map(struct agp_map *map)
|
||||
if (extent_free(ex, map->addr, map->size,
|
||||
EX_NOWAIT | EX_MALLOCOK ))
|
||||
printf("agp_destroy_map: can't free region\n");
|
||||
free(map, M_AGP);
|
||||
free(map, M_AGP, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: glxsb.c,v 1.27 2013/10/29 21:44:50 mikeb Exp $ */
|
||||
/* $OpenBSD: glxsb.c,v 1.28 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
|
||||
@ -383,7 +383,7 @@ glxsb_crypto_newsession(uint32_t *sidp, struct cryptoini *cri)
|
||||
if (sesn != 0) {
|
||||
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
|
||||
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
|
||||
free(sc->sc_sessions, M_DEVBUF);
|
||||
free(sc->sc_sessions, M_DEVBUF, 0);
|
||||
}
|
||||
sc->sc_sessions = ses;
|
||||
ses = &sc->sc_sessions[sesn];
|
||||
@ -525,22 +525,22 @@ glxsb_crypto_freesession(uint64_t tid)
|
||||
|
||||
if (swd->sw_kschedule) {
|
||||
explicit_bzero(swd->sw_kschedule, txf->ctxsize);
|
||||
free(swd->sw_kschedule, M_CRYPTO_DATA);
|
||||
free(swd->sw_kschedule, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
free(swd, M_CRYPTO_DATA);
|
||||
free(swd, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
if ((swd = sc->sc_sessions[sesn].ses_swd_auth)) {
|
||||
axf = swd->sw_axf;
|
||||
|
||||
if (swd->sw_ictx) {
|
||||
explicit_bzero(swd->sw_ictx, axf->ctxsize);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA);
|
||||
free(swd->sw_ictx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
if (swd->sw_octx) {
|
||||
explicit_bzero(swd->sw_octx, axf->ctxsize);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA);
|
||||
free(swd->sw_octx, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
free(swd, M_CRYPTO_DATA);
|
||||
free(swd, M_CRYPTO_DATA, 0);
|
||||
}
|
||||
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
|
||||
return (0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pci_machdep.c,v 1.78 2014/04/19 11:53:42 kettenis Exp $ */
|
||||
/* $OpenBSD: pci_machdep.c,v 1.79 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -867,7 +867,7 @@ pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie)
|
||||
idt_vec_free(ih->ih_vec);
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pcibios.c,v 1.44 2014/03/29 18:09:29 guenther Exp $ */
|
||||
/* $OpenBSD: pcibios.c,v 1.45 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */
|
||||
|
||||
/*
|
||||
@ -319,7 +319,7 @@ pcibios_pir_init(struct pcibios_softc *sc)
|
||||
&pcibios_pir_header.exclusive_irq) != PCIBIOS_SUCCESS) {
|
||||
printf("%s: PCI IRQ Routing information unavailable.\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
free(pcibios_pir_table, M_DEVBUF);
|
||||
free(pcibios_pir_table, M_DEVBUF, 0);
|
||||
pcibios_pir_table = NULL;
|
||||
pcibios_pir_table_nentries = 0;
|
||||
return NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: piix.c,v 1.9 2008/06/26 05:42:11 ray Exp $ */
|
||||
/* $OpenBSD: piix.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: piix.c,v 1.1 1999/11/17 01:21:20 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -113,7 +113,7 @@ piix_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag,
|
||||
|
||||
if (bus_space_map(iot, PIIX_REG_ELCR, PIIX_REG_ELCR_SIZE, 0,
|
||||
&ph->ph_elcr_ioh) != 0) {
|
||||
free(ph, M_DEVBUF);
|
||||
free(ph, M_DEVBUF, 0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rccosb4.c,v 1.4 2005/11/23 09:24:57 mickey Exp $ */
|
||||
/* $OpenBSD: rccosb4.c,v 1.5 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004,2005 Michael Shalayeff
|
||||
@ -79,12 +79,12 @@ osb4_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag,
|
||||
ph->piix.ph_tag = tag;
|
||||
|
||||
if (bus_space_map(iot, OSB4_PIAIR, 2, 0, &ph->osb4_ioh)) {
|
||||
free(ph, M_DEVBUF);
|
||||
free(ph, M_DEVBUF, 0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (bus_space_map(iot, OSB4_REG_ELCR, 2, 0, &ph->piix.ph_elcr_ioh)) {
|
||||
free(ph, M_DEVBUF);
|
||||
free(ph, M_DEVBUF, 0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
|
||||
/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
@ -142,7 +142,7 @@ vga_post_init(int bus, int device, int function)
|
||||
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
|
||||
if (err) {
|
||||
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
|
||||
free(sc, M_DEVBUF);
|
||||
free(sc, M_DEVBUF, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ vga_post_free(struct vga_post *sc)
|
||||
|
||||
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
|
||||
pmap_update(pmap_kernel());
|
||||
free(sc, M_DEVBUF);
|
||||
free(sc, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
#ifdef DDB
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: diskprobe.c,v 1.37 2013/11/05 15:17:56 krw Exp $ */
|
||||
/* $OpenBSD: diskprobe.c,v 1.38 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Tobias Weingartner
|
||||
@ -79,7 +79,7 @@ floppyprobe(void)
|
||||
if (debug)
|
||||
printf(" <!fd%u>", i);
|
||||
#endif
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ hardprobe(void)
|
||||
if (debug)
|
||||
printf(" <!hd%u>", i&0x7f);
|
||||
#endif
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ cdprobe(void)
|
||||
#if 0
|
||||
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
|
||||
printf(" <!cd0>"); /* XXX */
|
||||
free(dip, 0);
|
||||
free(dip, 0, 0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
|
||||
/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
|
||||
@ -315,7 +315,7 @@ srprobe(void)
|
||||
}
|
||||
|
||||
explicit_bzero(md, SR_META_SIZE * 512);
|
||||
free(md, 0);
|
||||
free(md, 0, 0);
|
||||
}
|
||||
|
||||
int
|
||||
@ -477,18 +477,18 @@ sr_clear_keys(void)
|
||||
continue;
|
||||
if (bv->sbv_keys != NULL) {
|
||||
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
|
||||
free(bv->sbv_keys, 0);
|
||||
free(bv->sbv_keys, 0, 0);
|
||||
bv->sbv_keys = NULL;
|
||||
}
|
||||
if (bv->sbv_maskkey != NULL) {
|
||||
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
|
||||
free(bv->sbv_maskkey, 0);
|
||||
free(bv->sbv_maskkey, 0, 0);
|
||||
bv->sbv_maskkey = NULL;
|
||||
}
|
||||
}
|
||||
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
|
||||
explicit_bzero(kd, sizeof(*kd));
|
||||
free(kd, 0);
|
||||
free(kd, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ done:
|
||||
|
||||
if (keys != NULL && rv != 0) {
|
||||
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
|
||||
free(keys, 0);
|
||||
free(keys, 0, 0);
|
||||
}
|
||||
|
||||
return (rv);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.10 2014/07/11 09:36:26 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.11 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
|
||||
|
||||
/*
|
||||
@ -126,7 +126,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
|
||||
DPRINTF(("bus_dmamap_destroy: t = %p, map = %p\n", t, map));
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: intr.c,v 1.8 2014/03/29 18:09:29 guenther Exp $ */
|
||||
/* $OpenBSD: intr.c,v 1.9 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
|
||||
|
||||
/*-
|
||||
@ -237,7 +237,7 @@ extintr_disestablish(void *aux)
|
||||
evcount_detach(&ih->ih_count);
|
||||
#endif
|
||||
|
||||
free((void *)ih, M_DEVBUF);
|
||||
free((void *)ih, M_DEVBUF, 0);
|
||||
|
||||
if (--eih->eih_nih == 0) {
|
||||
intc_intr_disestablish(eih->eih_func);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bonito.c,v 1.26 2014/05/24 21:11:01 miod Exp $ */
|
||||
/* $OpenBSD: bonito.c,v 1.27 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
|
||||
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
|
||||
|
||||
@ -468,7 +468,7 @@ bonito_intr_disestablish(void *vih)
|
||||
|
||||
splx(s);
|
||||
|
||||
free(ih, M_DEVBUF);
|
||||
free(ih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1204,7 +1204,7 @@ bonito_get_resource_extent(pci_chipset_tag_t pc, int io)
|
||||
|
||||
out:
|
||||
if (exname != NULL)
|
||||
free(exname, M_DEVBUF);
|
||||
free(exname, M_DEVBUF, 0);
|
||||
|
||||
return ex;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.14 2014/07/11 09:36:26 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
|
||||
@ -117,7 +117,7 @@ _dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
||||
void
|
||||
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dev.c,v 1.5 2013/06/11 16:42:09 deraadt Exp $ */
|
||||
/* $OpenBSD: dev.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010 Miodrag Vallat.
|
||||
@ -160,7 +160,7 @@ pmon_ioclose(struct open_file *f)
|
||||
if (f->f_devdata != NULL) {
|
||||
pi = (struct pmon_iodata *)f->f_devdata;
|
||||
rc = pmon_close(pi->fd);
|
||||
free(pi, sizeof *pi);
|
||||
free(pi, sizeof *pi, 0);
|
||||
f->f_devdata = NULL;
|
||||
} else
|
||||
rc = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sd.c,v 1.3 2013/10/29 21:49:07 miod Exp $ */
|
||||
/* $OpenBSD: sd.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.5 2013/01/22 15:48:40 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
@ -281,7 +281,7 @@ sdclose(struct open_file *f)
|
||||
{
|
||||
struct sd_softc *sc = f->f_devdata;
|
||||
|
||||
free(sc, sizeof *sc);
|
||||
free(sc, sizeof *sc, 0);
|
||||
f->f_devdata = NULL;
|
||||
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:42:50 miod Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -147,7 +147,7 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&siq->siq_mtx);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: awacs.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
|
||||
/* $OpenBSD: awacs.c,v 1.29 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
@ -975,7 +975,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
1, &p->nsegs, flags)) != 0) {
|
||||
printf("%s: unable to allocate dma, error = %d\n",
|
||||
sc->sc_dev.dv_xname, error);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -984,7 +984,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
printf("%s: unable to map dma, error = %d\n",
|
||||
sc->sc_dev.dv_xname, error);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -994,7 +994,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
sc->sc_dev.dv_xname, error);
|
||||
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1005,7 +1005,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
bus_dmamap_destroy(sc->sc_dmat, p->map);
|
||||
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dbdma.c,v 1.9 2007/09/17 01:33:33 krw Exp $ */
|
||||
/* $OpenBSD: dbdma.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
|
||||
|
||||
/*
|
||||
@ -153,5 +153,5 @@ dbdma_free(dbdma_t dt)
|
||||
bus_dmamem_unmap(dt->d_dmat, (caddr_t)dt->d_addr, dt->d_size);
|
||||
if (dt->d_nsegs)
|
||||
bus_dmamem_free(dt->d_dmat, dt->d_segs, dt->d_nsegs);
|
||||
free(dt, M_DEVBUF);
|
||||
free(dt, M_DEVBUF, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: i2s.c,v 1.23 2013/05/15 08:29:23 ratchov Exp $ */
|
||||
/* $OpenBSD: i2s.c,v 1.24 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
|
||||
|
||||
/*-
|
||||
@ -1177,7 +1177,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
1, &p->nsegs, flags)) != 0) {
|
||||
printf("%s: unable to allocate dma, error = %d\n",
|
||||
sc->sc_dev.dv_xname, error);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1186,7 +1186,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
printf("%s: unable to map dma, error = %d\n",
|
||||
sc->sc_dev.dv_xname, error);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1196,7 +1196,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
sc->sc_dev.dv_xname, error);
|
||||
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1207,7 +1207,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
|
||||
bus_dmamap_destroy(sc->sc_dmat, p->map);
|
||||
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
|
||||
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
|
||||
free(p, type);
|
||||
free(p, type, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: macintr.c,v 1.46 2014/04/01 20:27:14 mpi Exp $ */
|
||||
/* $OpenBSD: macintr.c,v 1.47 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
|
||||
@ -361,7 +361,7 @@ macintr_disestablish(void *lcp, void *arg)
|
||||
ppc_intr_enable(s);
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
free((void *)ih, M_DEVBUF);
|
||||
free((void *)ih, M_DEVBUF, 0);
|
||||
|
||||
if (TAILQ_EMPTY(&iq->iq_list))
|
||||
iq->iq_ist = IST_NONE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: openpic.c,v 1.71 2014/04/01 20:27:14 mpi Exp $ */
|
||||
/* $OpenBSD: openpic.c,v 1.72 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
|
||||
@ -379,7 +379,7 @@ openpic_intr_disestablish(void *lcp, void *arg)
|
||||
ppc_intr_enable(s);
|
||||
|
||||
evcount_detach(&ih->ih_count);
|
||||
free((void *)ih, M_DEVBUF);
|
||||
free((void *)ih, M_DEVBUF, 0);
|
||||
|
||||
if (TAILQ_EMPTY(&iq->iq_list))
|
||||
iq->iq_ist = IST_NONE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dma.c,v 1.39 2014/07/11 09:36:26 mpi Exp $ */
|
||||
/* $OpenBSD: dma.c,v 1.40 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
@ -103,7 +103,7 @@ void
|
||||
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mainbus.c,v 1.22 2014/07/02 15:34:43 tobiasu Exp $ */
|
||||
/* $OpenBSD: mainbus.c,v 1.23 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -90,7 +90,7 @@ mbattach(struct device *parent, struct device *self, void *aux)
|
||||
slen = strlen(t) + strlen(name) - 3;
|
||||
if ((hw_prod = malloc(slen, M_DEVBUF, M_NOWAIT)) != NULL) {
|
||||
snprintf(hw_prod, slen, "%s %s", t, name + 5);
|
||||
free(t, M_DEVBUF);
|
||||
free(t, M_DEVBUF, 0);
|
||||
}
|
||||
} else {
|
||||
/* New World Macintosh or Unknown */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mem.c,v 1.17 2011/11/10 17:30:32 krw Exp $ */
|
||||
/* $OpenBSD: mem.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
|
||||
|
||||
/*
|
||||
@ -152,7 +152,7 @@ mem_attach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
|
||||
/* No need to keep the "dimm-info" contents around. */
|
||||
free(sc->sc_buf, M_DEVBUF);
|
||||
free(sc->sc_buf, M_DEVBUF, 0);
|
||||
sc->sc_len = -1;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: openprom.c,v 1.2 2011/06/17 07:06:46 mk Exp $ */
|
||||
/* $OpenBSD: openprom.c,v 1.3 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */
|
||||
|
||||
/*
|
||||
@ -256,9 +256,9 @@ openpromioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
}
|
||||
|
||||
if (name)
|
||||
free(name, M_TEMP);
|
||||
free(name, M_TEMP, 0);
|
||||
if (value)
|
||||
free(value, M_TEMP);
|
||||
free(value, M_TEMP, 0);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.16 2014/07/08 17:19:25 deraadt Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.17 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -153,7 +153,7 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&siq->siq_mtx);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: octcf.c,v 1.14 2014/05/10 22:25:16 jasper Exp $ */
|
||||
/* $OpenBSD: octcf.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
|
||||
|
||||
/*
|
||||
@ -599,7 +599,7 @@ octcfioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p)
|
||||
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
|
||||
octcfgetdisklabel(dev, wd, lp, 0);
|
||||
bcopy(lp, wd->sc_dk.dk_label, sizeof(*lp));
|
||||
free(lp, M_TEMP);
|
||||
free(lp, M_TEMP, 0);
|
||||
goto exit;
|
||||
|
||||
case DIOCGPDINFO:
|
||||
@ -851,7 +851,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
|
||||
|
||||
if (error != 0) {
|
||||
printf("%s: identify failed: %d\n", __func__, error);
|
||||
free(tb, M_DEVBUF);
|
||||
free(tb, M_DEVBUF, 0);
|
||||
return CMD_ERR;
|
||||
} else {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
@ -882,7 +882,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
|
||||
prms->atap_model[1] == 'E') ||
|
||||
(prms->atap_model[0] == 'F' &&
|
||||
prms->atap_model[1] == 'X'))) {
|
||||
free(tb, M_DEVBUF);
|
||||
free(tb, M_DEVBUF, 0);
|
||||
return CMD_OK;
|
||||
}
|
||||
for (i = 0; i < sizeof(prms->atap_model); i += 2) {
|
||||
@ -898,7 +898,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
|
||||
*p = swap16(*p);
|
||||
}
|
||||
|
||||
free(tb, M_DEVBUF);
|
||||
free(tb, M_DEVBUF, 0);
|
||||
return CMD_OK;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: octeon_pcibus.c,v 1.14 2014/05/11 09:23:49 jasper Exp $ */
|
||||
/* $OpenBSD: octeon_pcibus.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
|
||||
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
|
||||
|
||||
@ -504,7 +504,7 @@ octeon_pcibus_get_resource_extent(pci_chipset_tag_t pc, int io)
|
||||
|
||||
out:
|
||||
if (exname != NULL)
|
||||
free(exname, M_DEVBUF);
|
||||
free(exname, M_DEVBUF, 0);
|
||||
|
||||
return ex;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bus_dma.c,v 1.11 2014/07/11 09:36:26 mpi Exp $ */
|
||||
/* $OpenBSD: bus_dma.c,v 1.12 2014/07/12 18:44:42 tedu Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
|
||||
@ -117,7 +117,7 @@ _dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
||||
void
|
||||
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
free(map, M_DEVBUF);
|
||||
free(map, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: softintr.c,v 1.5 2014/07/03 07:02:10 matthieu Exp $ */
|
||||
/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
|
||||
|
||||
/*
|
||||
@ -154,7 +154,7 @@ softintr_disestablish(void *arg)
|
||||
}
|
||||
mtx_leave(&siq->siq_mtx);
|
||||
|
||||
free(sih, M_DEVBUF);
|
||||
free(sih, M_DEVBUF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user