From: Rob Herring Date: Sat, 24 Aug 2013 15:10:49 +0000 (-0500) Subject: ahci: fix memory leak in ata_scsiop_inquiry X-Git-Tag: v2013.10-rc3~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=796c2ebd6f17da605a05eb233c907e4d8330f751;p=kernel%2Fu-boot.git 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 --- 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; }