Print this page
10075 make usr/src/tools smatch clean

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/protocmp/exception_list.c
          +++ new/usr/src/tools/protocmp/exception_list.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 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   *
  26   26   * Copyright 2015 PALO, Richard
       27 + *
       28 + * Copyright (c) 2018, Joyent, Inc.
  27   29   */
  28   30  
  29   31  #include <stdio.h>
  30   32  #include <stdlib.h>
  31   33  #include <string.h>
  32   34  
  33   35  #include "list.h"
  34   36  #include "exception_list.h"
  35   37  #include "arch.h"
  36   38  
↓ open down ↓ 32 lines elided ↑ open up ↑
  69   71          e->flag = 0;
  70   72          e->major = 0;
  71   73          e->minor = 0;
  72   74          e->link_parent = NULL;
  73   75          e->link_sib = NULL;
  74   76          e->symsrc = NULL;
  75   77          e->file_type = DIR_T;
  76   78  
  77   79          while ((e->arch = assign_arch(arch)) == 0) {
  78   80                  if ((arch = strtok(NULL, FS)) == NULL) {
       81 +                        free(e);
  79   82                          return (0);
  80   83                  }
  81   84          }
  82   85  
  83   86          (void) strcpy(e->name, name);
  84   87          add_elem(list, e);
  85   88  
  86   89          return (1);
  87   90  }
  88   91  
↓ open down ↓ 27 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX