diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-01-03 08:43:11 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-01-03 08:43:11 +0000 |
commit | 10aef96a6b9e743716ffaa63cac8091f73178058 (patch) | |
tree | 3e6c6ecae4488a44e8798de9e21a5c57292d66cc /sys | |
parent | 4992e595c46e07c250b4f77a8fa0ba2bf541ce95 (diff) |
Add size for free(9) in the bwfm(4) PCI attachment code.
From Michael W. Bombardieri
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_bwfm_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index 9e9be80a119..a36aba4d8e5 100644 --- a/sys/dev/pci/if_bwfm_pci.c +++ b/sys/dev/pci/if_bwfm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_pci.c,v 1.3 2018/01/01 22:41:56 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.4 2018/01/03 08:43:10 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -752,7 +752,7 @@ free: destroy: bus_dmamap_destroy(sc->sc_dmat, bdm->bdm_map); bdmfree: - free(bdm, M_DEVBUF, 0); + free(bdm, M_DEVBUF, sizeof(*bdm)); return (NULL); } @@ -763,7 +763,7 @@ bwfm_pci_dmamem_free(struct bwfm_pci_softc *sc, struct bwfm_pci_dmamem *bdm) bus_dmamem_unmap(sc->sc_dmat, bdm->bdm_kva, bdm->bdm_size); bus_dmamem_free(sc->sc_dmat, &bdm->bdm_seg, 1); bus_dmamap_destroy(sc->sc_dmat, bdm->bdm_map); - free(bdm, M_DEVBUF, 0); + free(bdm, M_DEVBUF, sizeof(*bdm)); } /* |