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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
          +++ new/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
↓ open down ↓ 258 lines elided ↑ open up ↑
 259  259          }
 260  260          if (dnode->ddn_cap && (topo_prop_set_string(dtn, TOPO_PGROUP_STORAGE,
 261  261              TOPO_STORAGE_CAPACITY, TOPO_PROP_IMMUTABLE,
 262  262              dnode->ddn_cap, &err) != 0)) {
 263  263                  topo_mod_dprintf(mod, "disk_set_props: "
 264  264                      "set cap error %s\n", topo_strerror(err));
 265  265                  goto error;
 266  266          }
 267  267          err = 0;
 268  268  
 269      -out:    if (fmri)
 270      -                nvlist_free(fmri);
      269 +out:
      270 +        nvlist_free(fmri);
 271  271          if (label)
 272  272                  topo_mod_strfree(mod, label);
 273      -        if (asru)
 274      -                nvlist_free(asru);
      273 +        nvlist_free(asru);
 275  274          return (err);
 276  275  
 277  276  error:  err = topo_mod_seterrno(mod, err);
 278  277          goto out;
 279  278  }
 280  279  
 281  280  /*
 282  281   * Trim leading and trailing whitespace from the string.
 283  282   */
 284  283  static char *
↓ open down ↓ 732 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX