ahci: fix memory leak in ata_scsiop_inquiry
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>
This commit is contained in:
parent
48c3a87c0a
commit
796c2ebd6f
|
@ -643,6 +643,7 @@ static int ata_scsiop_inquiry(ccb *pccb)
|
||||||
if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), tmpid,
|
if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), tmpid,
|
||||||
sizeof(hd_driveid_t), 0)) {
|
sizeof(hd_driveid_t), 0)) {
|
||||||
debug("scsi_ahci: SCSI inquiry command failure.\n");
|
debug("scsi_ahci: SCSI inquiry command failure.\n");
|
||||||
|
free(tmpid);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue