diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 55f3a4de603f..85a3a3c0c127 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -4209,6 +4209,7 @@ spa_ld_get_props(spa_t *spa) spa->spa_avz_action = AVZ_ACTION_INITIALIZE; ASSERT0(vdev_count_verify_zaps(spa->spa_root_vdev)); } else if (error != 0) { + nvlist_free(mos_config); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } else if (!nvlist_exists(mos_config, ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)) { /*