diff options
author | mav <mav@FreeBSD.org> | 2016-03-21 00:04:53 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-21 00:04:53 +0000 |
commit | be9d2c4881283a60df3c3ca0a20d6fdbe139c044 (patch) | |
tree | 8344cad11e8a61a56b3ba9b2911d8f6748ee5136 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c | |
parent | 9f09540febeed880e1e119b87f435bb06abca528 (diff) | |
download | FreeBSD-src-be9d2c4881283a60df3c3ca0a20d6fdbe139c044.zip FreeBSD-src-be9d2c4881283a60df3c3ca0a20d6fdbe139c044.tar.gz |
MFC r294820: MFV r294819: 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>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>
illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c index 79de1d1..85465ec 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c +++ b/sys/cddl/contrib/opensolaris/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; |