DragonFlyBSD Kernel Audit
DF-1745 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/disk/mpt/mpt_pci.c b/sys/dev/disk/mpt/mpt_pci.c
--- a/sys/dev/disk/mpt/mpt_pci.c
+++ b/sys/dev/disk/mpt/mpt_pci.c
@@ -763,6 +763,10 @@
         /* Make sure we aren't double destroying */
         if (mpt->reply_dmat == NULL) {
 		mpt_lprt(mpt, MPT_PRT_DEBUG, "already released dma memory\n");
+		if (mpt->parent_dmat != NULL) {
+			bus_dma_tag_destroy(mpt->parent_dmat);
+			mpt->parent_dmat = NULL;
+		}
 		return;
         }