]> git.sur5r.net Git - u-boot/commitdiff
ahci: fix memory leak in ata_scsiop_inquiry
authorRob Herring <rob.herring@calxeda.com>
Sat, 24 Aug 2013 15:10:49 +0000 (10:10 -0500)
committerTom Rini <trini@ti.com>
Fri, 6 Sep 2013 17:09:07 +0000 (13:09 -0400)
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>
drivers/block/ahci.c

index f4d1d8174f681e3b7f39f918991326e3eb48fd0b..f08806348b06af5e006e30d593b768c8dc022040 100644 (file)
@@ -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;
        }