summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/scsi/scsi_cd.c')
-rw-r--r--sys/cam/scsi/scsi_cd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index fa85ada..fde3c25 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -486,7 +486,9 @@ cdcleanup(struct cam_periph *periph)
xpt_print(periph->path, "removing changer entry\n");
free(softc->changer, M_DEVBUF);
}
+ cam_periph_unlock(periph);
disk_destroy(softc->disk);
+ cam_periph_lock(periph);
free(softc, M_DEVBUF);
}
OpenPOWER on IntegriCloud