]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add zfree to zero allocation before free
authorMatt Macy <mmacy@FreeBSD.org>
Sun, 16 Feb 2020 00:12:53 +0000 (00:12 +0000)
committerMatt Macy <mmacy@FreeBSD.org>
Sun, 16 Feb 2020 00:12:53 +0000 (00:12 +0000)
commit45035becfe8aed04d0da70585e7c8bc07a385980
treeaa3ed6bc820245de451a1a6fa1dcc557016759d6
parentbbb7a2c7c329494e0148026f8568c0da4d8db085
Add zfree to zero allocation before free

Key and cookie management typically wants to
avoid information leaks by explicitly zeroing
before free. This routine simplifies that by
permitting consumers to do so without carrying
the size around.

Reviewed by: jeff@, jhb@
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D22790
share/man/man9/malloc.9
sys/kern/kern_malloc.c
sys/sys/malloc.h