summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-01 16:55:58 +0000
committerGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-01 16:55:58 +0000
commite2e357a54c8b18d23c58e203b3f0d3f15d4ad597 (patch)
tree4f094295d9ad4d5a683aeb0de3e57a35de7b3669
parentac14e8653ee09a9ec164064b36b8c26c1bc79397 (diff)
Avoid panic when unconfiguring raid device which was autoconfigured and
so has fdp->fd_cdir = NULL. From Tertou <TDeval@PrimeOBJ.COM>
-rw-r--r--sys/kern/kern_descrip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index cf34f59d470..252695edd17 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.35 2001/09/29 20:10:43 gluk Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.36 2001/10/01 16:55:57 gluk Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -933,7 +933,8 @@ fdfree(p)
free(fdp->fd_himap, M_FILEDESC);
free(fdp->fd_lomap, M_FILEDESC);
}
- vrele(fdp->fd_cdir);
+ if (fdp->fd_cdir)
+ vrele(fdp->fd_cdir);
if (fdp->fd_rdir)
vrele(fdp->fd_rdir);
if (fdp->fd_knlist)