Call disk_destroy in cdcleanup() as appropriate.

PR:		24596
Reviewed by:	ken
This commit is contained in:
Dima Dorfman 2001-07-11 05:16:27 +00:00
parent 0ef36920de
commit e30b87b534

View File

@ -487,6 +487,9 @@ cdcleanup(struct cam_periph *periph)
}
devstat_remove_entry(&softc->device_stats);
cam_extend_release(cdperiphs, periph->unit_number);
if (softc->disk.d_dev) {
disk_destroy(softc->disk.d_dev);
}
free(softc, M_DEVBUF);
splx(s);
}