Page MenuHomeFreeBSD

D32127.id95717.diff
No OneTemporary

D32127.id95717.diff

diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -797,7 +797,7 @@
void *res;
size_t asize;
- KASSERT(align != 0 && powerof2(align),
+ KASSERT(powerof2(align),
("malloc_domainset_aligned: wrong align %#zx size %#zx",
align, size));
KASSERT(align <= PAGE_SIZE,
@@ -812,6 +812,8 @@
* align, since malloc zones provide alignment equal to their
* size.
*/
+ if (size == 0)
+ size = 1;
asize = size <= align ? align : 1UL << flsl(size - 1);
res = malloc_domainset(asize, mtp, ds, flags);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 6:11 PM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16203257
Default Alt Text
D32127.id95717.diff (592 B)

Event Timeline