Print this page
10124 smatch fixes for cryptoadm

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-crypto/cryptoadm/cryptoadm.c
          +++ new/usr/src/cmd/cmd-crypto/cryptoadm/cryptoadm.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  
       25 +/*
       26 + * Copyright (c) 2018, Joyent, Inc.
       27 + */
  25   28  
  26   29  #include <fcntl.h>
  27   30  #include <stdio.h>
  28   31  #include <stdlib.h>
  29   32  #include <strings.h>
  30   33  #include <unistd.h>
  31   34  #include <locale.h>
  32   35  #include <libgen.h>
  33   36  #include <sys/types.h>
  34   37  #include <zone.h>
↓ open down ↓ 1260 lines elided ↑ open up ↑
1295 1298                          rc = FAILURE;
1296 1299                  } else {
1297 1300                          sl_soft_count = psoftlist_kernel->sl_soft_count;
1298 1301  
1299 1302                          if (get_kcfconf_info(&pdevlist_conf, &psoftlist_conf)
1300 1303                              == FAILURE) {
1301 1304                                  cryptoerror(LOG_ERR,
1302 1305                                      "failed to retrieve the providers' "
1303 1306                                      "information from file kcf.conf - %s.",
1304 1307                                      _PATH_KCF_CONF);
1305      -                                free(psoftlist_kernel);
1306 1308                                  rc = FAILURE;
1307 1309                          } else {
1308 1310  
1309 1311                                  for (i = 0,
1310 1312                                      psoftname = psoftlist_kernel->sl_soft_names;
1311 1313                                      i < sl_soft_count;
1312 1314                                      ++i, psoftname += strlen(psoftname) + 1) {
1313 1315                                          pent = getent_kef(psoftname,
1314 1316                                              pdevlist_conf, psoftlist_conf);
1315 1317                                          (void) printf("\t%s%s\n", psoftname,
↓ open down ↓ 409 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX