From 80d23b96699e6d7461bc08a8890c7b01c0183bc3 Mon Sep 17 00:00:00 2001 From: Greg Lehey Date: Mon, 15 Dec 2003 00:44:05 +0000 Subject: [PATCH] free_plex, free_volume: Don't try to destroy the underlying device if it doesn't exist. This can occur under certain failure situations. --- sys/dev/vinum/vinumconfig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c index 88e89142d17..8227485f11a 100644 --- a/sys/dev/vinum/vinumconfig.c +++ b/sys/dev/vinum/vinumconfig.c @@ -823,7 +823,8 @@ free_plex(int plexno) Free(plex->sdnos); if (plex->lock) Free(plex->lock); - destroy_dev(plex->dev); + if (plex->dev) + destroy_dev(plex->dev); bzero(plex, sizeof(struct plex)); /* and clear it out */ plex->state = plex_unallocated; } @@ -894,7 +895,8 @@ free_volume(int volno) struct volume *vol; vol = &VOL[volno]; - destroy_dev(vol->dev); + if (vol->dev) + destroy_dev(vol->dev); bzero(vol, sizeof(struct volume)); /* and clear it out */ vol->state = volume_unallocated; }