Print this page
patch tsoome-feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/fm/topo/libtopo/common/topo_parse.c
          +++ new/usr/src/lib/fm/topo/libtopo/common/topo_parse.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  28      -
  29   27  #include <libxml/parser.h>
  30   28  #include <fm/libtopo.h>
  31   29  #include <topo_alloc.h>
  32   30  #include <topo_error.h>
  33   31  #include <topo_parse.h>
  34   32  #include <topo_subr.h>
  35   33  
  36   34  tf_info_t *
  37   35  tf_info_new(topo_mod_t *mp, xmlDocPtr doc, xmlChar *scheme)
  38   36  {
↓ open down ↓ 149 lines elided ↑ open up ↑
 188  186  }
 189  187  
 190  188  void
 191  189  tf_pad_free(topo_mod_t *mp, tf_pad_t *p)
 192  190  {
 193  191          int n;
 194  192          if (p == NULL)
 195  193                  return;
 196  194          if (p->tpad_pgs != NULL) {
 197  195                  for (n = 0; n < p->tpad_pgcnt; n++)
 198      -                        if (p->tpad_pgs[n] != NULL)
 199      -                                nvlist_free(p->tpad_pgs[n]);
      196 +                        nvlist_free(p->tpad_pgs[n]);
 200  197                  topo_mod_free(mp,
 201  198                      p->tpad_pgs, p->tpad_pgcnt * sizeof (nvlist_t *));
 202  199          }
 203  200          tf_rdata_free(mp, p->tpad_child);
 204  201          tf_rdata_free(mp, p->tpad_sibs);
 205  202          topo_mod_free(mp, p, sizeof (tf_pad_t));
 206  203  }
 207  204  
 208  205  void
 209  206  tf_edata_free(topo_mod_t *mp, tf_edata_t *p)
 210  207  {
 211  208          if (p == NULL)
 212  209                  return;
 213  210          if (p->te_name != NULL)
 214  211                  xmlFree(p->te_name);
 215  212          topo_mod_free(mp, p, sizeof (tf_edata_t));
 216  213  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX