summaryrefslogtreecommitdiffstats
path: root/sys/opencrypto/cryptosoft.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/opencrypto/cryptosoft.c')
-rw-r--r--sys/opencrypto/cryptosoft.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c
index ba83718..d115dbc 100644
--- a/sys/opencrypto/cryptosoft.c
+++ b/sys/opencrypto/cryptosoft.c
@@ -523,7 +523,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw,
* copy in a buffer.
*/
- MALLOC(data, u_int8_t *, crd->crd_len, M_CRYPTO_DATA, M_NOWAIT);
+ data = malloc(crd->crd_len, M_CRYPTO_DATA, M_NOWAIT);
if (data == NULL)
return (EINVAL);
crypto_copydata(flags, buf, crd->crd_skip, crd->crd_len, data);
@@ -533,7 +533,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw,
else
result = cxf->decompress(data, crd->crd_len, &out);
- FREE(data, M_CRYPTO_DATA);
+ free(data, M_CRYPTO_DATA);
if (result == 0)
return EINVAL;
@@ -545,7 +545,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw,
if (crd->crd_flags & CRD_F_COMP) {
if (result > crd->crd_len) {
/* Compression was useless, we lost time */
- FREE(out, M_CRYPTO_DATA);
+ free(out, M_CRYPTO_DATA);
return 0;
}
}
@@ -576,7 +576,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw,
}
}
}
- FREE(out, M_CRYPTO_DATA);
+ free(out, M_CRYPTO_DATA);
return 0;
}
@@ -635,7 +635,7 @@ swcr_newsession(device_t dev, u_int32_t *sid, struct cryptoini *cri)
*sid = i;
while (cri) {
- MALLOC(*swd, struct swcr_data *, sizeof(struct swcr_data),
+ *swd = malloc(sizeof(struct swcr_data),
M_CRYPTO_DATA, M_NOWAIT|M_ZERO);
if (*swd == NULL) {
swcr_freesession(dev, i);
@@ -873,7 +873,7 @@ swcr_freesession(device_t dev, u_int64_t tid)
break;
}
- FREE(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA);
}
return 0;
}
@@ -1036,7 +1036,7 @@ swcr_detach(device_t dev)
{
crypto_unregister_all(swcr_id);
if (swcr_sessions != NULL)
- FREE(swcr_sessions, M_CRYPTO_DATA);
+ free(swcr_sessions, M_CRYPTO_DATA);
}
static device_method_t swcr_methods[] = {
OpenPOWER on IntegriCloud