summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-01-24 18:50:15 +0000
committerad <ad@NetBSD.org>2008-01-24 18:50:15 +0000
commit7b081426cb72ea4d258bd112b5d79e4a1c4589ea (patch)
tree9989c29e3444df2fe0919234f2b3973dc7064fde /sys/dev
parentd9231f613d8153022d9c46a51e8d74cd2d7651a9 (diff)
Destroy mutex when detaching. PR kern/37819.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/com.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index ccc2dc556b6..841c939ffc1 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.270 2008/01/20 18:09:10 joerg Exp $ */
+/* $NetBSD: com.c,v 1.271 2008/01/24 18:50:15 ad Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.270 2008/01/20 18:09:10 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.271 2008/01/24 18:50:15 ad Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -633,6 +633,9 @@ com_detach(struct device *self, int flags)
rnd_detach_source(&sc->rnd_source);
#endif
+ /* Destroy the lock. */
+ mutex_destroy(&sc->sc_lock);
+
return (0);
}