summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2009-09-21 17:03:58 -0400
committerAdam Jackson <[email protected]>2009-09-21 17:04:22 -0400
commit83019ffc0708708af7ee1ddbf3cbf949bcf076bd (patch)
treeaabef52e5373d72289c14933658aee49e33c1c01 /src/mesa
parent40603526f478a59b89a4c0a07c75a97dfe56b8c3 (diff)
selinux: Fix mmap() return value check
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/execmem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index 57c1e117c89..4c6139985fe 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -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);
}