projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4060352
)
selinux: Fix mmap() return value check
author
Adam Jackson
<ajax@redhat.com>
Mon, 21 Sep 2009 21:03:58 +0000
(17:03 -0400)
committer
Adam Jackson
<ajax@redhat.com>
Mon, 21 Sep 2009 21:04:22 +0000
(17:04 -0400)
src/mesa/main/execmem.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/execmem.c
b/src/mesa/main/execmem.c
index 57c1e117c89063d95cd6222847b86276e9c46892..4c6139985fe5b4977dcbc240761856549a57eebc 100644
(file)
--- 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
);
}