Hello, In bwfm_pci_dmamem_alloc() and bwfm_pci_dmamem_free(), bdm points to a single struct not an array. When freeing it we can just use the struct size. Does this look correct?
- Michael Index: if_bwfm_pci.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_bwfm_pci.c,v retrieving revision 1.3 diff -u -p -u -r1.3 if_bwfm_pci.c --- if_bwfm_pci.c 1 Jan 2018 22:41:56 -0000 1.3 +++ if_bwfm_pci.c 3 Jan 2018 07:26:39 -0000 @@ -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_sof 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)); } /*