From 7b081426cb72ea4d258bd112b5d79e4a1c4589ea Mon Sep 17 00:00:00 2001 From: ad Date: Thu, 24 Jan 2008 18:50:15 +0000 Subject: Destroy mutex when detaching. PR kern/37819. --- sys/dev/ic/com.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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 -__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); } -- cgit