diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-29 12:17:08 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-29 12:17:08 +0000 |
| commit | 67c3f4c9f70c40ce0dd12db8804e720c3a0c0c79 (patch) | |
| tree | a3220c2c4058a61e04dd53a843726a6dd4266a54 /usr/src/lib/libzfs/common/libzfs_pool.c | |
| parent | e5490f12d073ec144d62bc50456b750256cc7c0a (diff) | |
| parent | aab83bb83be7342f6cfccaed8d5fe0b2f404855d (diff) | |
| download | illumos-joyent-67c3f4c9f70c40ce0dd12db8804e720c3a0c0c79.tar.gz | |
[illumos-gate merge]
commit aab83bb83be7342f6cfccaed8d5fe0b2f404855d
6659 nvlist_free(NULL) is a no-op
commit d643a855cbd8c4fb4fe966406fa05dff70673597
6674 sys/isa_defs.h shouldn't unconditionally define _ILP32
commit bcf23f43dc1b73080eeded927585ee86feab40a7
6596 Macro redefined in strtolctype.h
Diffstat (limited to 'usr/src/lib/libzfs/common/libzfs_pool.c')
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c index 50e8a440f0..1eb2a08f6b 100644 --- a/usr/src/lib/libzfs/common/libzfs_pool.c +++ b/usr/src/lib/libzfs/common/libzfs_pool.c @@ -1032,12 +1032,9 @@ zpool_open(libzfs_handle_t *hdl, const char *pool) void zpool_close(zpool_handle_t *zhp) { - if (zhp->zpool_config) - nvlist_free(zhp->zpool_config); - if (zhp->zpool_old_config) - nvlist_free(zhp->zpool_old_config); - if (zhp->zpool_props) - nvlist_free(zhp->zpool_props); + nvlist_free(zhp->zpool_config); + nvlist_free(zhp->zpool_old_config); + nvlist_free(zhp->zpool_props); free(zhp); } @@ -1555,8 +1552,7 @@ zpool_import(libzfs_handle_t *hdl, nvlist_t *config, const char *newname, ret = zpool_import_props(hdl, config, newname, props, ZFS_IMPORT_NORMAL); - if (props) - nvlist_free(props); + nvlist_free(props); return (ret); } @@ -2861,8 +2857,7 @@ zpool_vdev_split(zpool_handle_t *zhp, char *newname, nvlist_t **newroot, &children) != 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "Source pool is missing vdev tree")); - if (zc_props) - nvlist_free(zc_props); + nvlist_free(zc_props); return (-1); } @@ -3010,10 +3005,8 @@ out: free(varray); } zcmd_free_nvlists(&zc); - if (zc_props) - nvlist_free(zc_props); - if (newconfig) - nvlist_free(newconfig); + nvlist_free(zc_props); + nvlist_free(newconfig); if (freelist) { nvlist_free(*newroot); *newroot = NULL; |
