From: Jiri Slaby <jirislaby@gmail.com>
To: James.Bottomley@suse.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>,
James Smart <james.smart@emulex.com>
Subject: [PATCH 3/5] SCSI: lpfc, fix memory leak
Date: Wed, 23 Sep 2009 16:15:33 +0200 [thread overview]
Message-ID: <1253715335-6723-3-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <1253715335-6723-1-git-send-email-jirislaby@gmail.com>
Stanse found a memory leak on one fail path in lpfc_sli4_read_rev.
Add there kfree.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: James Smart <james.smart@emulex.com>
Cc: James E.J. Bottomley <James.Bottomley@suse.de>
---
drivers/scsi/lpfc/lpfc_sli.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 43cbe33..7750868 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4211,6 +4211,7 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,
if (rc) {
dma_free_coherent(&phba->pcidev->dev, dma_size,
dmabuf->virt, dmabuf->phys);
+ kfree(dmabuf);
return -EIO;
}
--
1.6.4.2
next prev parent reply other threads:[~2009-09-23 14:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 14:15 [PATCH 1/5] SCSI: aacraid, " Jiri Slaby
2009-09-23 14:15 ` [PATCH 2/5] SCSI: remove unnecessary NULL test Jiri Slaby
2009-09-23 14:15 ` Jiri Slaby [this message]
2009-09-23 14:15 ` [PATCH 4/5] SCSI: qla2xxx, fix NULL-ptr dereference Jiri Slaby
2009-09-25 7:36 ` Anirban Chakraborty
2009-09-23 14:15 ` [PATCH 5/5] SCSI: scsi_lib, fix potential NULL dereference Jiri Slaby
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=1253715335-6723-3-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=james.smart@emulex.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®