diff options
| author | haad <haad@NetBSD.org> | 2009-04-13 18:51:54 +0000 |
|---|---|---|
| committer | haad <haad@NetBSD.org> | 2009-04-13 18:51:54 +0000 |
| commit | 33e2a4a9188dc77002044c665df95690dc7197e7 (patch) | |
| tree | 727298b7b422d1354b7cb79c324597c63272832b /sys/dev/dm/dm_dev.c | |
| parent | 94d1f41faa7c153af50158e89c6a0c70578bac3a (diff) | |
Destroy locks in dm_dev_free, do not allocate struct disk twice.
Diffstat (limited to 'sys/dev/dm/dm_dev.c')
| -rw-r--r-- | sys/dev/dm/dm_dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
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)); |
