Fix pmap_trm_alloc(M_ZERO).

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2018-04-18 20:09:26 +00:00
parent 17cdb360cb
commit 919015a42e

View File

@ -5630,6 +5630,8 @@ pmap_trm_alloc(size_t size, int flags)
0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, flags | M_FIRSTFIT, &res);
if (error != 0)
return (NULL);
if ((flags & M_ZERO) != 0)
bzero((void *)res, size);
return ((void *)res);
}