From 796c2ebd6f17da605a05eb233c907e4d8330f751 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Sat, 24 Aug 2013 10:10:49 -0500 Subject: [PATCH] ahci: fix memory leak in ata_scsiop_inquiry This fixes a memory leak when scsi inquiry fails. Signed-off-by: Rob Herring Reviewed-by: Tom Rini --- drivers/block/ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c index f4d1d8174f..f08806348b 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; } -- 2.25.1