Fix the panic (""memory modified after free") when ata_getparam() fails

and retries.

Found by:	Nate Lawson
This commit is contained in:
sos 2004-07-31 10:29:29 +00:00
parent 73d6fc0052
commit e95ea22d81

View File

@ -560,6 +560,7 @@ ata_getparam(struct ata_device *atadev, u_int8_t command)
request->flags = (ATA_R_READ | ATA_R_IMMEDIATE);
request->data = (caddr_t)atadev->param;
request->bytecount = sizeof(struct ata_params);
request->donecount = 0;
request->transfersize = DEV_BSIZE;
ata_queue_request(request);
if (!(error = request->result))