mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-01-06 05:07:56 -05:00
mark pvalloc error path as unlikely
This commit is contained in:
parent
b0f81365a8
commit
da190f1469
@ -1512,7 +1512,7 @@ EXPORT void *h_valloc(size_t size) {
|
|||||||
|
|
||||||
EXPORT void *h_pvalloc(size_t size) {
|
EXPORT void *h_pvalloc(size_t size) {
|
||||||
size = PAGE_CEILING(size);
|
size = PAGE_CEILING(size);
|
||||||
if (!size) {
|
if (unlikely(!size)) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user