From 8a5fc74880251aa651306d1dbcc60715698996f0 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Thu, 31 Mar 2016 23:54:07 -0400 Subject: Illumos 6659 - nvlist_free(NULL) is a no-op 6659 nvlist_free(NULL) is a no-op Reviewed by: Toomas Soome Reviewed by: Marcel Telka Approved by: Robert Mustacchi References: https://www.illumos.org/issues/6659 https://github.com/illumos/illumos-gate/commit/aab83bb Ported-by: David Quigley Signed-off-by: Brian Behlendorf Closes #4566 --- module/zfs/spa.c | 3 +-- module/zfs/spa_config.c | 3 +-- module/zfs/zfs_ioctl.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'module') diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 01048bfe9..63425d3d0 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -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); diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c index a62d25bd3..904940a65 100644 --- a/module/zfs/spa_config.c +++ b/module/zfs/spa_config.c @@ -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); } diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 5c84d238f..50f6a7a2c 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -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); } -- cgit v1.2.3