aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2022-11-22 12:28:07 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2022-11-22 12:28:07 +0000
commit517547573a5bcf28c676daca3a9118fcd28c8116 (patch)
tree2fe3bb5f3f56c80036ee8b6e06e2e5fd9e7490aa /sys/opencrypto
parentc1bfe8c593f9047ff00c1204e4f086256af45bc2 (diff)
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/crypto.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
index 25bbc9a4bf70..0baa61c089d3 100644
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -1633,17 +1633,11 @@ crypto_freereq(struct cryptop *crp)
uma_zfree(cryptop_zone, crp);
}
-static void
-_crypto_initreq(struct cryptop *crp, crypto_session_t cses)
-{
- crp->crp_session = cses;
-}
-
void
crypto_initreq(struct cryptop *crp, crypto_session_t cses)
{
memset(crp, 0, sizeof(*crp));
- _crypto_initreq(crp, cses);
+ crp->crp_session = cses;
}
struct cryptop *
@@ -1652,9 +1646,9 @@ crypto_getreq(crypto_session_t cses, int how)
struct cryptop *crp;
MPASS(how == M_WAITOK || how == M_NOWAIT);
- crp = uma_zalloc(cryptop_zone, how | M_ZERO);
+ crp = uma_zalloc(cryptop_zone, how);
if (crp != NULL)
- _crypto_initreq(crp, cses);
+ crypto_initreq(crp, cses);
return (crp);
}