* [SCSI] lpfc: possible memory leak in lpfc_sli4_bsg_diag_loopback_mode()
@ 2011-06-06 7:30 Vasily Averin
2011-06-06 16:00 ` Vasily Averin
0 siblings, 1 reply; 3+ messages in thread
From: Vasily Averin @ 2011-06-06 7:30 UTC (permalink / raw)
To: linux-scsi, James Smart; +Cc: James Bottomley
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [SCSI] lpfc: possible memory leak in lpfc_sli4_bsg_diag_loopback_mode()
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
0 siblings, 0 replies; 3+ messages in thread
From: Vasily Averin @ 2011-06-06 16:00 UTC (permalink / raw)
Cc: linux-scsi, James Smart, James Bottomley
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [SCSI] lpfc: possible memory leak in lpfc_sli4_bsg_diag_loopback_mode()
@ 2011-06-06 16:01 Vasily Averin
0 siblings, 0 replies; 3+ messages in thread
From: Vasily Averin @ 2011-06-06 16:01 UTC (permalink / raw)
To: linux-scsi, James Smart; +Cc: James Bottomley
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-06 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2011-06-06 16:01 Vasily Averin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox