projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7cb673
)
mesa: check for posix_memalign() errors
author
pontus lidman
<pontus.lidman@27m.se>
Mon, 29 Nov 2010 16:20:41 +0000
(09:20 -0700)
committer
Brian Paul
<brianp@vmware.com>
Mon, 29 Nov 2010 16:20:41 +0000
(09:20 -0700)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/main/imports.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/imports.c
b/src/mesa/main/imports.c
index bcca4edc1aa77dd3b898a1c5ea355f93672adba0..cefbf4d8c98772c1543167e97f1523383bad4733 100644
(file)
--- a/
src/mesa/main/imports.c
+++ b/
src/mesa/main/imports.c
@@
-88,7
+88,8
@@
_mesa_align_malloc(size_t bytes, unsigned long alignment)
#if defined(HAVE_POSIX_MEMALIGN)
void *mem;
int err = posix_memalign(& mem, alignment, bytes);
- (void) err;
+ if (err)
+ return NULL;
return mem;
#elif defined(_WIN32) && defined(_MSC_VER)
return _aligned_malloc(bytes, alignment);