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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.c
          +++ new/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.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 2007 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  /*
  30   28   * Disk & Indicator Monitor configuration file support routines
  31   29   */
  32   30  
  33   31  #include <sys/types.h>
  34   32  #include <sys/stat.h>
  35   33  #include <fcntl.h>
  36   34  #include <unistd.h>
  37   35  #include <string.h>
  38   36  #include <strings.h>
↓ open down ↓ 329 lines elided ↑ open up ↑
 368  366  
 369  367  void
 370  368  diskmon_free(diskmon_t *dmp)
 371  369  {
 372  370          diskmon_t *nextp;
 373  371  
 374  372          /* Free the whole list */
 375  373          while (dmp != NULL) {
 376  374                  nextp = dmp->next;
 377  375  
 378      -                if (dmp->props)
 379      -                        nvlist_free(dmp->props);
      376 +                nvlist_free(dmp->props);
 380  377                  if (dmp->location)
 381  378                          dstrfree(dmp->location);
 382  379                  if (dmp->ind_list)
 383  380                          ind_free(dmp->ind_list);
 384  381                  if (dmp->indrule_list)
 385  382                          indrule_free(dmp->indrule_list);
 386      -                if (dmp->app_props)
 387      -                        nvlist_free(dmp->app_props);
      383 +                nvlist_free(dmp->app_props);
 388  384                  if (dmp->frup)
 389  385                          dmfru_free(dmp->frup);
 390  386                  dfree(dmp, sizeof (diskmon_t));
 391  387  
 392  388                  dmp = nextp;
 393  389          }
 394  390  }
 395  391  
 396  392  static cfgdata_t *
 397  393  new_cfgdata(namevalpr_t *nvp, diskmon_t *dmp)
↓ open down ↓ 477 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX