MFC r287100: spa_import_rootpool: prevent lock and resource leak
PR: 198563
This commit is contained in:
parent
c83542f5e0
commit
5be2a0f48e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user