summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Hartland <steven.hartland@multiplay.co.uk>2015-12-15 11:55:14 -0800
committerMatthew Ahrens <mahrens@delphix.com>2015-12-15 12:09:15 -0800
commit2bad22584defe4667f99737e3158d336e4dcca11 (patch)
treeab05c8dad114b6f92ef5f6744efd53a6a80774d1
parentf693d300fbefaa2bd9a229a874b5994532a30d87 (diff)
downloadillumos-joyent-2bad22584defe4667f99737e3158d336e4dcca11.tar.gz
6495 Fix mutex leak in dmu_objset_find_dp
Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Albert Lee <trisk@omniti.com>
-rw-r--r--usr/src/uts/common/fs/zfs/dmu_objset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/dmu_objset.c b/usr/src/uts/common/fs/zfs/dmu_objset.c
index 79de1d127d..85465ec943 100644
--- a/usr/src/uts/common/fs/zfs/dmu_objset.c
+++ b/usr/src/uts/common/fs/zfs/dmu_objset.c
@@ -1789,6 +1789,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
* thread suffices. For now, stay single threaded.
*/
dmu_objset_find_dp_impl(dcp);
+ mutex_destroy(&err_lock);
return (error);
}
@@ -1800,6 +1801,8 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
INT_MAX, 0);
if (tq == NULL) {
kmem_free(dcp, sizeof (*dcp));
+ mutex_destroy(&err_lock);
+
return (SET_ERROR(ENOMEM));
}
dcp->dc_tq = tq;