diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-06 04:10:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-06 04:10:59 +0000 |
commit | 4b4f1fc7887ab60c01ed23c351d3ca280827ad65 (patch) | |
tree | df1386a7fb07e0a312cda611f9e6c1c171affdeb /sys/dev/ic | |
parent | ae756fcd14ffb221898cfa6007e3fcd9df563f57 (diff) |
srom size is tracked, pass to free()
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/atw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 5f3053759c1..95a77c6b4c2 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.87 2015/03/14 03:38:47 jsg Exp $ */ +/* $OpenBSD: atw.c,v 1.88 2015/09/06 04:10:58 deraadt Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -419,7 +419,7 @@ atw_read_srom(struct atw_softc *sc) if (!read_seeprom(&sd, sc->sc_srom, 0, sc->sc_sromsz/2)) { printf("%s: could not read SROM\n", sc->sc_dev.dv_xname); - free(sc->sc_srom, M_DEVBUF, 0); + free(sc->sc_srom, M_DEVBUF, sc->sc_sromsz); return -1; } #ifdef ATW_DEBUG @@ -2739,7 +2739,7 @@ atw_detach(struct atw_softc *sc) bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); if (sc->sc_srom) - free(sc->sc_srom, M_DEVBUF, 0); + free(sc->sc_srom, M_DEVBUF, sc->sc_sromsz); return (0); } |