Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4130
This commit is contained in:
Alexander Motin 2010-06-05 08:07:54 +00:00
parent c4d8fe61a1
commit dc5a530b04
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208814

View File

@ -2047,6 +2047,7 @@ ahci_issue_read_log(device_t dev)
ataio = &ccb->ataio;
ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT);
if (ataio->data_ptr == NULL) {
xpt_free_ccb(ccb);
device_printf(dev, "Unable allocate memory for READ LOG command");
return; /* XXX */
}