Print this page
10076 make usr/src/test smatch clean

Split Close
Expand all
Collapse all
          --- old/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c
          +++ new/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c
↓ open down ↓ 68 lines elided ↑ open up ↑
  69   69  
  70   70  crypto_op_t *
  71   71  cryptotest_init(cryptotest_t *arg, crypto_func_group_t fg)
  72   72  {
  73   73          crypto_op_t *op = malloc(sizeof (*op));
  74   74  
  75   75          if (op == NULL)
  76   76                  return (NULL);
  77   77  
  78   78          while ((fd = open(CRYPTO_DEVICE, O_RDWR)) < 0) {
  79      -                if (errno != EINTR)
       79 +                if (errno != EINTR) {
       80 +                        free(op);
  80   81                          return (NULL);
       82 +                }
  81   83          }
  82   84  
  83   85          op->in = (char *)arg->in;
  84   86          op->out = (char *)arg->out;
  85   87          op->key = (char *)arg->key;
  86   88          op->param = (char *)arg->param;
  87   89  
  88   90          op->inlen = arg->inlen;
  89   91          op->outlen = arg->outlen;
  90   92          op->keylen = arg->keylen * 8; /* kcf uses keylen in bits */
↓ open down ↓ 370 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX