summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-06-10 09:52:21 +0200
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 12:01:41 -0500
commit1462b8ffd9a9e4798d4e0f9eaadbd1ac0373a11b (patch)
tree5871d70365de8c83edaf199c59a085ec8fd96558 /drivers/scsi
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')
-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 854414551bb..353a90b3574 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,
if (status != 0) {
shost_printk(KERN_ERR, phba->shost,
"wrbq create failed.");
+ kfree(pwrb_arr);
return status;
}
phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i].