diff options
author | Dan Carpenter <error27@gmail.com> | 2010-06-10 11:52:21 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 21:01:41 +0400 |
commit | 1462b8ffd9a9e4798d4e0f9eaadbd1ac0373a11b (patch) | |
tree | 5871d70365de8c83edaf199c59a085ec8fd96558 /drivers/scsi/be2iscsi/be_main.c | |
parent | c5f10187965f93ef7ef67da9c7c449b13b6dee1b (diff) | |
download | linux-1462b8ffd9a9e4798d4e0f9eaadbd1ac0373a11b.tar.xz |
[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.c | 1 |
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, 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]. |