diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2015-09-15 12:58:51 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2015-10-20 11:50:15 -0500 |
commit | 82e938d40482c4204047485108b5c145c0101b29 (patch) | |
tree | 101889adc232b23df1e53f33e797fd42ce530dd7 /sys/opencrypto/cryptodev.c | |
parent | f64002f02d197d738df982cada3a82696430e136 (diff) | |
download | FreeBSD-src-82e938d40482c4204047485108b5c145c0101b29.zip FreeBSD-src-82e938d40482c4204047485108b5c145c0101b29.tar.gz |
MFC r262993:
some minor clean up.. Always _ZERO memory so mtx_init won't panic...
use the proper macro instead of hand rolling it...
Reviewed by: jhb (only the malloc change)
MFC after: 1 week
TAG: IPSEC-HEAD
Issue: #4841
Diffstat (limited to 'sys/opencrypto/cryptodev.c')
-rw-r--r-- | sys/opencrypto/cryptodev.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 44bfa5c..5e949ca 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -1044,12 +1044,7 @@ csecreate(struct fcrypt *fcr, u_int64_t sid, caddr_t key, u_int64_t keylen, { struct csession *cse; -#ifdef INVARIANTS - /* NB: required when mtx_init is built with INVARIANTS */ cse = malloc(sizeof(struct csession), M_XDATA, M_NOWAIT | M_ZERO); -#else - cse = malloc(sizeof(struct csession), M_XDATA, M_NOWAIT); -#endif if (cse == NULL) return NULL; mtx_init(&cse->lock, "cryptodev", "crypto session lock", MTX_DEF); |