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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/intel_nb5000/intel_nbdrv.c
          +++ new/usr/src/uts/intel/io/intel_nb5000/intel_nbdrv.c
↓ open down ↓ 305 lines elided ↑ open up ↑
 306  306  
 307  307          (void) nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP);
 308  308          (void) nvlist_add_uint8(nvl, MCINTEL_NVLIST_VERSTR,
 309  309              MCINTEL_NVLIST_VERS);
 310  310          (void) nvlist_add_string(nvl, "memory-controller", inb_mc_name());
 311  311          if (nb_chipset == INTEL_NB_5100)
 312  312                  (void) nvlist_add_uint8(nvl, MCINTEL_NVLIST_NMEM,
 313  313                      (uint8_t)nb_number_memory_controllers);
 314  314          inb_dimmlist(nvl);
 315  315  
 316      -        if (inb_mc_nvl)
 317      -                nvlist_free(inb_mc_nvl);
      316 +        nvlist_free(inb_mc_nvl);
 318  317          inb_mc_nvl = nvl;
 319  318  }
 320  319  
 321  320  static void
 322  321  inb_mc_snapshot_destroy()
 323  322  {
 324  323          ASSERT(RW_LOCK_HELD(&inb_mc_lock));
 325  324  
 326  325          if (inb_mc_snapshot == NULL)
 327  326                  return;
↓ open down ↓ 230 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX