diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-09 18:23:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-09 18:23:40 +0000 |
commit | 83cd1e1453595256c7be990a734ce64653b1c7a5 (patch) | |
tree | d5feb2b37b98b8d266f12837e1e7304fbdf3dd28 /sys/dev/ic | |
parent | 6b47b8cd961621e9af8f5b65364b1995ad10cf8f (diff) |
sizes for free(); ok sthen semarie
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/sti.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/vga.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 09655dea047..f2a872ece20 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.76 2015/04/05 23:25:57 miod Exp $ */ +/* $OpenBSD: sti.c,v 1.77 2015/09/09 18:23:39 deraadt Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -165,7 +165,7 @@ sti_attach_common(struct sti_softc *sc, bus_space_tag_t iot, rom->rom_softc = sc; rc = sti_rom_setup(rom, iot, memt, romh, sc->bases, codebase); if (rc != 0) { - free(rom, M_DEVBUF, 0); + free(rom, M_DEVBUF, sizeof *rom); return (rc); } @@ -197,7 +197,7 @@ sti_attach_screen(struct sti_softc *sc, int flags) scr->scr_rom = sc->sc_rom; rc = sti_screen_setup(scr, flags); if (rc != 0) { - free(scr, M_DEVBUF, 0); + free(scr, M_DEVBUF, sizeof *scr); return (NULL); } diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index da71f35e703..076b78afe28 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.67 2015/07/26 03:17:07 miod Exp $ */ +/* $OpenBSD: vga.c,v 1.68 2015/09/09 18:23:39 deraadt Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /*- @@ -730,7 +730,7 @@ vga_free_screen(void *v, void *cookie) if (vc->nscreens != 0) free(vs->pcs.mem, M_DEVBUF, 0); - free(vs, M_DEVBUF, 0); + free(vs, M_DEVBUF, sizeof *vs); } else panic("vga_free_screen: console"); |