From c7820789f75cb3fa33fc682ebfd926a144a0cb09 Mon Sep 17 00:00:00 2001 From: dd Date: Wed, 11 Jul 2001 05:16:27 +0000 Subject: Call disk_destroy in cdcleanup() as appropriate. PR: 24596 Reviewed by: ken --- sys/cam/scsi/scsi_cd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/cam') diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index ca6122c..ded1d1a 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -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); } -- cgit v1.1