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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/modules/common/disk-monitor/topo_gather.c
          +++ new/usr/src/cmd/fm/modules/common/disk-monitor/topo_gather.c
↓ open down ↓ 699 lines elided ↑ open up ↑
 700  700                          cfgdata_add_diskmon(config_data, diskp);
 701  701                          if (nvlist_add_uint64(g_topo2diskmon, cstr,
 702  702                              (uint64_t)(uintptr_t)diskp) != 0) {
 703  703                                  log_msg(MM_TOPO,
 704  704                                      "Could not add pointer to nvlist "
 705  705                                      "for `%s'!\n", cstr);
 706  706                          }
 707  707                  } else if (diskp != NULL) {
 708  708                          diskmon_free(diskp);
 709  709                  } else {
 710      -                        if (dmap_nvl)
 711      -                                nvlist_free(dmap_nvl);
      710 +                        nvlist_free(dmap_nvl);
 712  711                          if (indp)
 713  712                                  ind_free(indp);
 714  713                          if (indrp)
 715  714                                  indrule_free(indrp);
 716      -                        if (diskprops)
 717      -                                nvlist_free(diskprops);
      715 +                        nvlist_free(diskprops);
 718  716                  }
 719  717  
 720  718                  wdp->pfmri = cstr;
 721  719          }
 722  720  
 723  721  
 724  722          return (0);
 725  723  }
 726  724  
 727  725  /*ARGSUSED*/
↓ open down ↓ 67 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX