Skip to content

Commit

Permalink
cciss: memory leak in cciss_init_one()
Browse files Browse the repository at this point in the history
commit 22bece0
(cciss: fix regression firmware not displayed in procfs)
added a small memory leak in cciss_init_one()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Eric Dumazet authored and Jens Axboe committed Sep 11, 2009
1 parent 723590e commit 212a502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3889,7 +3889,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
int j = 0;
int rc;
int dac, return_code;
InquiryData_struct *inq_buff = NULL;
InquiryData_struct *inq_buff;

if (reset_devices) {
/* Reset the controller with a PCI power-cycle */
Expand Down Expand Up @@ -4029,6 +4029,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
printk(KERN_WARNING "cciss: unable to determine firmware"
" version of controller\n");
}
kfree(inq_buff);

cciss_procinit(i);

Expand All @@ -4045,7 +4046,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
return 1;

clean4:
kfree(inq_buff);
kfree(hba[i]->cmd_pool_bits);
if (hba[i]->cmd_pool)
pci_free_consistent(hba[i]->pdev,
Expand Down

0 comments on commit 212a502

Please sign in to comment.