From: Vasily Averin <vvs@parallels.com>
Cc: linux-scsi@vger.kernel.org, James Smart <james.smart@emulex.com>,
James Bottomley <jbottomley@parallels.com>
Subject: Re: [SCSI] lpfc: possible memory leak in lpfc_sli4_bsg_diag_loopback_mode()
Date: Mon, 06 Jun 2011 20:00:56 +0400 [thread overview]
Message-ID: <4DECF9B8.90805@parallels.com> (raw)
In-Reply-To: <4DEC821F.8080409@parallels.com>
sorry, my thunderbird have corrupted this patch, I'll resend it
On 06/06/2011 11:30 AM, Vasily Averin wrote:
> error path after lpfc_sli4_config() failure uses uninitialized
> variable mbxstatus and can forget to free allocated memory
>
> Signed-off-by: Vasily Averin <vvs@sw.ru>
> ---
> drivers/scsi/lpfc/lpfc_bsg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index 7fb0ba4..9620327 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -1741,7 +1741,7 @@ lpfc_sli4_bsg_diag_loopback_mode(struct lpfc_hba *phba,
> struct fc_bsg_job *job)
> uint32_t link_flags, timeout, req_len, alloc_len;
> struct lpfc_mbx_set_link_diag_loopback *link_diag_loopback;
> LPFC_MBOXQ_t *pmboxq = NULL;
> - int mbxstatus, i, rc = 0;
> + int mbxstatus = MBX_SUCCESS, i, rc = 0;
>
> /* no data to return just the return code */
> job->reply->reply_payload_rcv_len = 0;
next prev parent reply other threads:[~2011-06-06 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 7:30 [SCSI] lpfc: possible memory leak in lpfc_sli4_bsg_diag_loopback_mode() Vasily Averin
2011-06-06 16:00 ` Vasily Averin [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-06 16:01 Vasily Averin
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=4DECF9B8.90805@parallels.com \
--to=vvs@parallels.com \
--cc=james.smart@emulex.com \
--cc=jbottomley@parallels.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox