diff options
Diffstat (limited to 'sys/dev')
-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); } |