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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/contract.c
          +++ new/usr/src/uts/common/os/contract.c
↓ open down ↓ 1829 lines elided ↑ open up ↑
1830 1830          mutex_enter(&e->cte_lock);
1831 1831          ASSERT(e->cte_refs > 0);
1832 1832          if (--e->cte_refs) {
1833 1833                  mutex_exit(&e->cte_lock);
1834 1834                  return;
1835 1835          }
1836 1836  
1837 1837          contract_rele(e->cte_contract);
1838 1838  
1839 1839          mutex_destroy(&e->cte_lock);
1840      -        if (e->cte_data)
1841      -                nvlist_free(e->cte_data);
1842      -        if (e->cte_gdata)
1843      -                nvlist_free(e->cte_gdata);
     1840 +        nvlist_free(e->cte_data);
     1841 +        nvlist_free(e->cte_gdata);
1844 1842          kmem_free(e, sizeof (ct_kevent_t));
1845 1843  }
1846 1844  
1847 1845  /*
1848 1846   * cte_qrele
1849 1847   *
1850 1848   * Remove this listener's hold on the specified event, removing and
1851 1849   * releasing the queue's hold on the event if appropriate.
1852 1850   */
1853 1851  static void
↓ open down ↓ 834 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX