aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-06-10 03:52:21 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:01:41 -0400
commit1462b8ffd9a9e4798d4e0f9eaadbd1ac0373a11b (patch)
tree5871d70365de8c83edaf199c59a085ec8fd96558 /drivers/scsi/be2iscsi/be_main.c
parentc5f10187965f93ef7ef67da9c7c449b13b6dee1b (diff)
[SCSI] be2iscsi: fix memory leak on error path
I added a kfree(pwrb_arr) in front of the return. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 854414551bb0..353a90b3574d 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2750,6 +2750,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
2750 if (status != 0) { 2750 if (status != 0) {
2751 shost_printk(KERN_ERR, phba->shost, 2751 shost_printk(KERN_ERR, phba->shost,
2752 "wrbq create failed."); 2752 "wrbq create failed.");
2753 kfree(pwrb_arr);
2753 return status; 2754 return status;
2754 } 2755 }
2755 phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i]. 2756 phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i].