Skip to contentSkip to conversation

SCSI: aic7xxx_osm_pci resource leak fix.

PATCH New Jesper Juhl 1 participant 1 message Apr 23, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCSI: aic7xxx_osm_pci resource leak fix.

Fix resource leak in drivers/scsi/aic7xxx/aic7xxx_osm_pci.c::ahc_linux_pci_dev_probe()

Found by the coverity checker (#668)

---

 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c |    1 +
 1 files changed, 1 insertion(+)
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -0
@@ -219,6 +219,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *
 		ahc->flags |= AHC_39BIT_ADDRESSING;
 	} else {
 		if (dma_set_mask(dev, DMA_32BIT_MASK)) {
+			ahc_free(ahc);
 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
                 	return (-ENODEV);
 		}

(please keep replies CC'ed to me)