From 33e2a4a9188dc77002044c665df95690dc7197e7 Mon Sep 17 00:00:00 2001 From: haad Date: Mon, 13 Apr 2009 18:51:54 +0000 Subject: Destroy locks in dm_dev_free, do not allocate struct disk twice. --- sys/dev/dm/dm_dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/dm/dm_dev.c') diff --git a/sys/dev/dm/dm_dev.c b/sys/dev/dm/dm_dev.c index 5543b0aa43f..3c8d20721b9 100644 --- a/sys/dev/dm/dm_dev.c +++ b/sys/dev/dm/dm_dev.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm_dev.c,v 1.4 2009/03/18 10:22:39 cegger Exp $ */ +/* $NetBSD: dm_dev.c,v 1.5 2009/04/13 18:51:54 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -320,6 +320,9 @@ dm_dev_free(dm_dev_t *dmv) { KASSERT(dmv != NULL); + mutex_destroy(&dmv->dev_mtx); + cv_destroy(&dmv->dev_cv); + if(dmv->diskp != NULL) (void)kmem_free(dmv->diskp, sizeof(struct disk)); -- cgit