mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 00:20:11 +01:00
selinux: Fix mmap() return value check
This commit is contained in:
parent
40603526f4
commit
83019ffc07
1 changed files with 3 additions and 4 deletions
|
|
@ -80,11 +80,10 @@ init_heap(void)
|
|||
exec_heap = mmInit( 0, EXEC_HEAP_SIZE );
|
||||
|
||||
if (!exec_mem)
|
||||
exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
|
||||
PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
|
||||
return (exec_mem != NULL);
|
||||
return (exec_mem != MAP_FAILED);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue