mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Dont call free on non-alloc'd items.
This commit is contained in:
parent
9caee2ece7
commit
055ec4dbbc
1 changed files with 4 additions and 2 deletions
|
|
@ -1335,7 +1335,8 @@ acd_report_key(device_t dev, struct dvd_authinfo *ai)
|
|||
error = ata_atapicmd(dev, ccb, (caddr_t)d, length,
|
||||
ai->format == DVD_INVALIDATE_AGID ? 0 : ATA_R_READ,10);
|
||||
if (error) {
|
||||
free(d, M_ACD);
|
||||
if (length)
|
||||
free(d, M_ACD);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
@ -1377,7 +1378,8 @@ acd_report_key(device_t dev, struct dvd_authinfo *ai)
|
|||
default:
|
||||
error = EINVAL;
|
||||
}
|
||||
free(d, M_ACD);
|
||||
if (length)
|
||||
free(d, M_ACD);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue