From: Dan Carpenter Date: Thu, 10 Jun 2010 07:52:21 +0000 (+0200) Subject: [SCSI] be2iscsi: fix memory leak on error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1462b8ffd9a9e4798d4e0f9eaadbd1ac0373a11b;p=linux-beck.git [SCSI] be2iscsi: fix memory leak on error path I added a kfree(pwrb_arr) in front of the return. Signed-off-by: Dan Carpenter Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- 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].