-/* $OpenBSD: if_qe.c,v 1.29 2014/12/22 02:26:54 tedu Exp $ */
+/* $OpenBSD: if_qe.c,v 1.30 2014/12/23 21:39:12 miod Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
* All done with the bus resources.
*/
ubfree((void *)parent, &ui);
- free(ring, M_TEMP, 0);
+ free(ring, M_TEMP, PROBESIZE);
return 1;
}
-/* $OpenBSD: legss.c,v 1.7 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: legss.c,v 1.8 2014/12/23 21:39:12 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
vax_unmap_physmem(scr->ss_vram,
(LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY) / VAX_NBPG);
bad1:
- free(scr, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, sizeof(struct legss_screen));
}
/*
-/* $OpenBSD: uda.c,v 1.10 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: uda.c,v 1.11 2014/12/23 21:39:12 miod Exp $ */
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
return 0;
mscp_dgo(sc->sc_softc, mxi);
sc->sc_inq--;
- free(uu, M_DEVBUF, 0);
+ free(uu, M_DEVBUF, sizeof(struct uba_unit));
return 1;
}
-/* $OpenBSD: bus_dma.c,v 1.31 2014/11/16 12:30:59 deraadt Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.32 2014/12/23 21:39:12 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */
/*-
bus_dma_tag_t t;
bus_dmamap_t map;
{
+ size_t mapsize;
#ifdef DEBUG_DMA
printf("dmamap_destroy: t=%p map=%p\n", t, map);
if (map->dm_nsegs > 0)
printf("bus_dmamap_destroy() called for map with valid mappings\n");
#endif /* DIAGNOSTIC */
- free(map, M_DEVBUF, 0);
+ mapsize = sizeof(struct vax_bus_dmamap) +
+ (sizeof(bus_dma_segment_t) * (map->_dm_segcnt - 1));
+ free(map, M_DEVBUF, mapsize);
}
/*
-/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: softintr.c,v 1.5 2014/12/23 21:39:12 miod Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF, 0);
+ free(sih, M_DEVBUF, sizeof(*sih));
}
/*
-/* $OpenBSD: gpx.c,v 1.24 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: gpx.c,v 1.25 2014/12/23 21:39:12 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
bad2:
vax_unmap_physmem((vaddr_t)scr->ss_adder, 1);
bad1:
- free(scr, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, sizeof(struct gpx_screen));
}
/*
-/* $OpenBSD: lcg.c,v 1.22 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: lcg.c,v 1.23 2014/12/23 21:39:12 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
fail2:
vax_unmap_physmem((vaddr_t)ss->ss_addr, ss->ss_fbsize / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF, 0);
+ free(ss, M_DEVBUF, sizeof(*ss));
}
/*
-/* $OpenBSD: lcspx.c,v 1.20 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: lcspx.c,v 1.21 2014/12/23 21:39:12 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
vax_unmap_physmem((vaddr_t)ss->ss_ramdac[i], 1);
vax_unmap_physmem(ss->ss_reg, LCSPX_REG_SIZE / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF, 0);
+ free(ss, M_DEVBUF, sizeof(*ss));
}
static __inline__ void
-/* $OpenBSD: smg.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: smg.c,v 1.28 2014/12/23 21:39:12 miod Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
(caddr_t)vax_map_physmem(SMADDR, SMSIZE / VAX_NBPG);
if (scr->ss_addr == NULL) {
printf(": can not map frame buffer\n");
- free(scr, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, sizeof(*scr));
return;
}
printf(": can not map cursor chip\n");
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, sizeof(*scr));
return;
}
vax_unmap_physmem((vaddr_t)scr->ss_cursor, 1);
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, sizeof(*scr));
return;
}
}