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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libscf/common/notify_params.c
          +++ new/usr/src/lib/libscf/common/notify_params.c
↓ open down ↓ 1762 lines elided ↑ open up ↑
1763 1763          if (nvlist_add_nvlist_array(nvl, SCF_NOTIFY_PARAMS, &params, 1) != 0 ||
1764 1764              nvlist_add_uint32(nvl, SCF_NOTIFY_NAME_VERSION,
1765 1765              SCF_NOTIFY_PARAMS_VERSION) != 0) {
1766 1766                  (void) scf_set_error(SCF_ERROR_NO_MEMORY);
1767 1767                  goto cleanup;
1768 1768          }
1769 1769  
1770 1770          r = SCF_SUCCESS;
1771 1771  
1772 1772  cleanup:
1773      -        if (params)
1774      -                nvlist_free(params);
     1773 +        nvlist_free(params);
1775 1774          scf_pg_destroy(pg);
1776 1775          scf_instance_destroy(i);
1777 1776          scf_handle_destroy(h);
1778 1777          free(pgname);
1779 1778  
1780 1779          return (r);
1781 1780  }
1782 1781  
1783 1782  /*
1784 1783   * Retrieve the notification parameters for the Event described in the
↓ open down ↓ 195 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX