diff options
author | Florin Malita <fmalita@gmail.com> | 2007-10-13 13:03:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-15 14:29:48 -0400 |
commit | bc2618f7528d4b6ea0c2c53539a3b8cff2b33b24 (patch) | |
tree | aae1d3769d1fa2c9bcbaef50bb08e1291f8b8cae /drivers/net | |
parent | 7e7b968a07022d6aa369b38b095570db241c7bea (diff) | |
download | linux-bc2618f7528d4b6ea0c2c53539a3b8cff2b33b24.tar.bz2 |
tehuti: possible leak in bdx_probe
If pci_enable_device fails, bdx_probe returns without freeing the
allocated pci_nic structure.
Coverity CID 1908.
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tehuti.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 8d04654f0c59..4e1b84e6d66a 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c @@ -1906,7 +1906,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /************** pci *****************/ if ((err = pci_enable_device(pdev))) /* it trigers interrupt, dunno why. */ - RET(err); /* it's not a problem though */ + goto err_pci; /* it's not a problem though */ if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { @@ -2076,6 +2076,7 @@ err_out_res: pci_release_regions(pdev); err_dma: pci_disable_device(pdev); +err_pci: vfree(nic); RET(err); |