diff options
author | dd <dd@FreeBSD.org> | 2001-07-11 05:16:27 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-07-11 05:16:27 +0000 |
commit | c7820789f75cb3fa33fc682ebfd926a144a0cb09 (patch) | |
tree | 8556328838b4b329196e1fe18c100a731af2ff28 /sys/cam | |
parent | 600fc1a6a289df04dafbf68fd8f78830d6da72dd (diff) | |
download | FreeBSD-src-c7820789f75cb3fa33fc682ebfd926a144a0cb09.zip FreeBSD-src-c7820789f75cb3fa33fc682ebfd926a144a0cb09.tar.gz |
Call disk_destroy in cdcleanup() as appropriate.
PR: 24596
Reviewed by: ken
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |