diff options
author | avg <avg@FreeBSD.org> | 2015-09-11 13:32:19 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2015-09-11 13:32:19 +0000 |
commit | 5be2a0f48edf04cc6f799c301c10871cb21a705b (patch) | |
tree | 287aa8d0a56dd782290e9d7774421a0f72559466 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | |
parent | c83542f5e0a017bb1409d89d91de72feba2898b4 (diff) | |
download | FreeBSD-src-5be2a0f48edf04cc6f799c301c10871cb21a705b.zip FreeBSD-src-5be2a0f48edf04cc6f799c301c10871cb21a705b.tar.gz |
MFC r287100: spa_import_rootpool: prevent lock and resource leak
PR: 198563
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index af4a50f..c07737e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -4129,6 +4129,8 @@ spa_import_rootpool(const char *name) &spa->spa_ubsync.ub_version) != 0) spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL; } else if ((spa = spa_lookup(name)) == NULL) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); cmn_err(CE_NOTE, "Cannot find the pool label for '%s'", name); return (EIO); |