All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Dan Carpenter <error27@gmail.com>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>,
	"James E.J. Bottomley" <James.Bottomley@suse.de>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 1/2] be2iscsi: memory leak on error path
Date: Thu, 10 Jun 2010 20:44:05 +0000	[thread overview]
Message-ID: <4C114E95.7080401@cs.wisc.edu> (raw)
In-Reply-To: <20100610075221.GI5483@bicker>

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>

WARNING: multiple messages have this Message-ID (diff)
From: Mike Christie <michaelc@cs.wisc.edu>
To: Dan Carpenter <error27@gmail.com>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>,
	"James E.J. Bottomley" <James.Bottomley@suse.de>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 1/2] be2iscsi: memory leak on error path
Date: Thu, 10 Jun 2010 15:44:05 -0500	[thread overview]
Message-ID: <4C114E95.7080401@cs.wisc.edu> (raw)
In-Reply-To: <20100610075221.GI5483@bicker>

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>

  reply	other threads:[~2010-06-10 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  7:52 [patch 1/2] be2iscsi: memory leak on error path Dan Carpenter
2010-06-10  7:52 ` Dan Carpenter
2010-06-10 20:44 ` Mike Christie [this message]
2010-06-10 20:44   ` Mike Christie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C114E95.7080401@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@suse.de \
    --cc=error27@gmail.com \
    --cc=jayamohank@serverengines.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.