destroy mutex/cv before freeing the struct holding them, fixes

LOCKDEBUG panic
This commit is contained in:
drochner 2011-01-03 13:12:40 +00:00
parent 23e235307b
commit bccb285ad5
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_strat_sequential.c,v 1.10 2009/05/20 15:30:26 reinoud Exp $ */
/* $NetBSD: udf_strat_sequential.c,v 1.11 2011/01/03 13:12:40 drochner Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.10 2009/05/20 15:30:26 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.11 2011/01/03 13:12:40 drochner Exp $");
#endif /* not lint */
@ -671,6 +671,9 @@ udf_discstrat_finish_seq(struct udf_strat_args *args)
/* destroy our pool */
pool_destroy(&priv->desc_pool);
mutex_destroy(&priv->discstrat_mutex);
cv_destroy(&priv->discstrat_cv);
/* free our private space */
free(ump->strategy_private, M_UDFTEMP);
ump->strategy_private = NULL;