]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use zfree() instead of explicit_bzero() and free().
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 25 Jun 2020 20:17:34 +0000 (20:17 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 25 Jun 2020 20:17:34 +0000 (20:17 +0000)
commit4a711b8d04cca5a50566a78a62f769eed0f0de65
treed020de486faa671c7ab9bf8101d19d6eebf8f03a
parentea143d1be682ae3871b140cd00b8cb435a4d0dc3
Use zfree() instead of explicit_bzero() and free().

In addition to reducing lines of code, this also ensures that the full
allocation is always zeroed avoiding possible bugs with incorrect
lengths passed to explicit_bzero().

Suggested by: cem
Reviewed by: cem, delphij
Approved by: csprng (cem)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25435
15 files changed:
sys/crypto/aesni/aesni.c
sys/crypto/via/padlock_cipher.c
sys/dev/cxgbe/crypto/t4_kern_tls.c
sys/dev/random/randomdev.c
sys/geom/eli/g_eli.c
sys/geom/eli/g_eli_ctl.c
sys/geom/eli/g_eli_key_cache.c
sys/geom/geom_dev.c
sys/kern/kern_environment.c
sys/kern/kern_shutdown.c
sys/kern/uipc_ktls.c
sys/netinet/netdump/netdump_client.c
sys/opencrypto/crypto.c
sys/opencrypto/cryptosoft.c
sys/opencrypto/ktls_ocf.c