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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/pci/pci_boot.c
          +++ new/usr/src/uts/intel/io/pci/pci_boot.c
↓ open down ↓ 358 lines elided ↑ open up ↑
 359  359  
 360  360          rval = nvlist_add_nvlist(nvl, "table", sub_nvl);
 361  361          if (rval != DDI_SUCCESS)
 362  362                  goto error;
 363  363          nvlist_free(sub_nvl);
 364  364  
 365  365          *ret_nvl = nvl;
 366  366          return (DDI_SUCCESS);
 367  367  
 368  368  error:
 369      -        if (sub_nvl)
 370      -                nvlist_free(sub_nvl);
      369 +        nvlist_free(sub_nvl);
 371  370          ASSERT(nvl);
 372  371          nvlist_free(nvl);
 373  372          *ret_nvl = NULL;
 374  373          return (DDI_FAILURE);
 375  374  }
 376  375  
 377  376  static void
 378  377  pci_cache_free_list(nvf_handle_t hdl)
 379  378  {
 380  379          list_t          *listp;
↓ open down ↓ 3022 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX