Illumos 6659 - nvlist_free(NULL) is a no-op

6659 nvlist_free(NULL) is a no-op
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Robert Mustacchi <rm@joyent.com>

References:
  https://www.illumos.org/issues/6659
  https://github.com/illumos/illumos-gate/commit/aab83bb

Ported-by: David Quigley <dpquigl@davequigley.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4566
This commit is contained in:
Josef 'Jeff' Sipek
2016-03-31 23:54:07 -04:00
committed by Brian Behlendorf
parent 16794374b3
commit 8a5fc74880
11 changed files with 19 additions and 39 deletions
+1 -2
View File
@@ -6132,8 +6132,7 @@ spa_sync_config_object(spa_t *spa, dmu_tx_t *tx)
spa_config_exit(spa, SCL_STATE, FTAG);
if (spa->spa_config_syncing)
nvlist_free(spa->spa_config_syncing);
nvlist_free(spa->spa_config_syncing);
spa->spa_config_syncing = config;
spa_sync_nvlist(spa, spa->spa_config_object, config, tx);
+1 -2
View File
@@ -376,8 +376,7 @@ void
spa_config_set(spa_t *spa, nvlist_t *config)
{
mutex_enter(&spa->spa_props_lock);
if (spa->spa_config != NULL)
nvlist_free(spa->spa_config);
nvlist_free(spa->spa_config);
spa->spa_config = config;
mutex_exit(&spa->spa_props_lock);
}
+1 -3
View File
@@ -1536,9 +1536,7 @@ zfs_ioc_pool_import(zfs_cmd_t *zc)
}
nvlist_free(config);
if (props)
nvlist_free(props);
nvlist_free(props);
return (error);
}