summaryrefslogtreecommitdiff
path: root/sys/dev/pci/mfii.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-04-08 02:57:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-04-08 02:57:26 +0000
commitbbfe5cc76c1caf2b1b5fcc22429b420fdec501f8 (patch)
tree96f1934f62e4c72a1c903e650d612858ae90e9d6 /sys/dev/pci/mfii.c
parentb2ed98c2714b1414dd6b981eb8733a1d7d4a689c (diff)
A pile of sizes to free(9). In test for a few days in snapshots.
Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.
Diffstat (limited to 'sys/dev/pci/mfii.c')
-rw-r--r--sys/dev/pci/mfii.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 38dffe7f9df..95e9e69bf39 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.42 2017/02/11 04:12:28 dlg Exp $ */
+/* $OpenBSD: mfii.c,v 1.43 2017/04/08 02:57:25 deraadt Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -719,7 +719,7 @@ mfii_syspd(struct mfii_softc *sc)
return (0);
free_pdsc:
- free(sc->sc_pd, M_DEVBUF, 0);
+ free(sc->sc_pd, M_DEVBUF, sizeof(*sc->sc_pd));
return (1);
}
@@ -795,7 +795,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->mdm_map);
mdmfree:
- free(m, M_DEVBUF, 0);
+ free(m, M_DEVBUF, sizeof *m);
return (NULL);
}
@@ -807,7 +807,7 @@ mfii_dmamem_free(struct mfii_softc *sc, struct mfii_dmamem *m)
bus_dmamem_unmap(sc->sc_dmat, m->mdm_kva, m->mdm_size);
bus_dmamem_free(sc->sc_dmat, &m->mdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, m->mdm_map);
- free(m, M_DEVBUF, 0);
+ free(m, M_DEVBUF, sizeof *m);
}
void