From: Rob Herring <robherring2@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/8] ahci: fix memory leak in ata_scsiop_inquiry
Date: Sat, 24 Aug 2013 10:10:49 -0500 [thread overview]
Message-ID: <1377357054-27408-3-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1377357054-27408-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
This fixes a memory leak when scsi inquiry fails.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Tom Rini <trini@ti.com>
---
v2: rebase to v2013.10-rc1
drivers/block/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index f4d1d81..f088063 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -643,6 +643,7 @@ static int ata_scsiop_inquiry(ccb *pccb)
if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), tmpid,
sizeof(hd_driveid_t), 0)) {
debug("scsi_ahci: SCSI inquiry command failure.\n");
+ free(tmpid);
return -EIO;
}
--
1.8.1.2
next prev parent reply other threads:[~2013-08-24 15:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 15:10 [U-Boot] [PATCH v2 1/8] ahci: use ports implemented map instead of num_ports Rob Herring
2013-08-24 15:10 ` [U-Boot] [PATCH v2 2/8] ahci: fix unaligned access Rob Herring
2013-08-24 15:10 ` Rob Herring [this message]
2013-08-24 15:10 ` [U-Boot] [PATCH v2 4/8] ahci: add defines for PORT_SCR_STAT register bits Rob Herring
2013-08-24 15:10 ` [U-Boot] [PATCH v2 5/8] ahci: move link bring-up handling to separate function Rob Herring
2013-08-24 15:10 ` [U-Boot] [PATCH v2 6/8] ahci: handle COMINIT received during spin-up Rob Herring
2013-08-24 15:10 ` [U-Boot] [PATCH v2 7/8] ahci: increase spin-up timeout to 20 sec Rob Herring
2013-08-24 15:10 ` [U-Boot] [PATCH v2 8/8] ahci: convert to use libata functions and definitions Rob Herring
2013-09-06 21:24 ` [U-Boot] [U-Boot, v2, 1/8] ahci: use ports implemented map instead of num_ports Tom Rini
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=1377357054-27408-3-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=u-boot@lists.denx.de \
/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