summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorpontus lidman <pontus.lidman@27m.se>2010-11-29 09:20:41 -0700
committerBrian Paul <brianp@vmware.com>2010-11-29 09:20:41 -0700
commitb1097607db58ddaa91281e364dbb4aa53d904052 (patch)
tree532b8a10bd2cb5acef257062ce0ef6793d532292 /src/mesa/main
parenta7cb673aa1b1184ac58d77ff400d1d70d316dc06 (diff)
mesa: check for posix_memalign() errors
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/imports.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index bcca4edc1a..cefbf4d8c9 100644
--- 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);