Fix memory leaks in (a|)daregister introduced in r298002
commitc6fd5fa14f248a0eec331edd13b649e25142f924
authorcem <cem@FreeBSD.org>
Tue, 7 Jun 2016 20:33:55 +0000 (7 20:33 +0000)
committercem <cem@FreeBSD.org>
Tue, 7 Jun 2016 20:33:55 +0000 (7 20:33 +0000)
tree7cd958d80e737085b2b714623c228a10bbf6dd1a
parent2b749a1b9244c8ba27478116a8feddc141a1477e
Fix memory leaks in (a|)daregister introduced in r298002

In the case where cam_iosched_init() fails, the ada and da softcs were leaked.
Instead, free them.

Reported by: Coverity
CID: 1356039
Sponsored by: EMC / Isilon Storage Division
sys/cam/ata/ata_da.c
sys/cam/scsi/scsi_da.c