Print this page
6659 nvlist_free(NULL) is a no-op

*** 1023,1037 **** * Close the handle. Simply frees the memory associated with the handle. */ 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); free(zhp); } /* --- 1023,1034 ----
*** 1546,1556 **** } } ret = zpool_import_props(hdl, config, newname, props, ZFS_IMPORT_NORMAL); - if (props) nvlist_free(props); return (ret); } static void --- 1543,1552 ----
*** 2852,2862 **** if (nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN, &child, &children) != 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "Source pool is missing vdev tree")); - if (zc_props) nvlist_free(zc_props); return (-1); } varray = zfs_alloc(hdl, children * sizeof (nvlist_t *)); --- 2848,2857 ----
*** 3001,3013 **** for (v = 0; v < vcount; v++) nvlist_free(varray[v]); free(varray); } zcmd_free_nvlists(&zc); - if (zc_props) nvlist_free(zc_props); - if (newconfig) nvlist_free(newconfig); if (freelist) { nvlist_free(*newroot); *newroot = NULL; } --- 2996,3006 ----