Commit 1462b8ff authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley
Browse files

[SCSI] be2iscsi: fix memory leak on error path



I added a kfree(pwrb_arr) in front of the return.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent c5f10187
......@@ -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].
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment