[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>
This commit is contained in:
parent
c5f1018796
commit
1462b8ffd9
|
@ -2750,6 +2750,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
shost_printk(KERN_ERR, phba->shost,
|
shost_printk(KERN_ERR, phba->shost,
|
||||||
"wrbq create failed.");
|
"wrbq create failed.");
|
||||||
|
kfree(pwrb_arr);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i].
|
phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i].
|
||||||
|
|
Loading…
Reference in New Issue