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

Split Close
Expand all
Collapse all
          --- old/usr/src/common/fsreparse/fs_reparse.c
          +++ new/usr/src/common/fsreparse/fs_reparse.c
↓ open down ↓ 72 lines elided ↑ open up ↑
  73   73  
  74   74  /*
  75   75   * reparse_free()
  76   76   *
  77   77   * Function to free memory of a nvlist allocated previously
  78   78   * by reparse_init().
  79   79   */
  80   80  void
  81   81  reparse_free(nvlist_t *nvl)
  82   82  {
  83      -        if (nvl)
  84      -                nvlist_free(nvl);
       83 +        nvlist_free(nvl);
  85   84  }
  86   85  
  87   86  /*
  88   87   * reparse_parse()
  89   88   *
  90   89   * Parse the specified string and populate the nvlist with the svc_types
  91   90   * and data from the 'string'.  The string could be read from the reparse
  92   91   * point symlink body. This routine will allocate memory that must be
  93   92   * freed by reparse_free().
  94   93   *
↓ open down ↓ 234 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX