* [patch 1/2] be2iscsi: memory leak on error path
@ 2010-06-10 7:52 Dan Carpenter
2010-06-10 20:44 ` Mike Christie
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-06-10 7:52 UTC (permalink / raw)
To: Jayamohan Kallickal
Cc: James E.J. Bottomley, Mike Christie, linux-scsi, kernel-janitors
I added a kfree(pwrb_arr) in front of the return.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index dd5b105..779e1d1 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].
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 1/2] be2iscsi: memory leak on error path
2010-06-10 7:52 [patch 1/2] be2iscsi: memory leak on error path Dan Carpenter
@ 2010-06-10 20:44 ` Mike Christie
0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2010-06-10 20:44 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jayamohan Kallickal, James E.J. Bottomley, linux-scsi,
kernel-janitors
On 06/10/2010 02:52 AM, Dan Carpenter wrote:
> I added a kfree(pwrb_arr) in front of the return.
>
> Signed-off-by: Dan Carpenter<error27@gmail.com>
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index dd5b105..779e1d1 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].
Looks good. Thanks.
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-10 20:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 7:52 [patch 1/2] be2iscsi: memory leak on error path Dan Carpenter
2010-06-10 20:44 ` Mike Christie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox