diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-08-14 09:44:49 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-08-14 11:01:42 +0100 |
commit | a8540ef9fb22bbedc788c374fda3354047df110f (patch) | |
tree | 234ee599623470467a6d60cf60822e22fa9b4e6a /src/gallium/include | |
parent | 50c6092355edf9e978a3c34cb816d4833bcf92fd (diff) |
gallium: Catch errors from posix_memalign.
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h index eec413842f..4e1a996122 100644 --- a/src/gallium/include/pipe/p_util.h +++ b/src/gallium/include/pipe/p_util.h @@ -213,7 +213,8 @@ align_malloc(size_t bytes, uint alignment) { #if defined(HAVE_POSIX_MEMALIGN) void *mem; - (void) posix_memalign(& mem, alignment, bytes); + if(posix_memalign(& mem, alignment, bytes) != 0) + return NULL; return mem; #else char *ptr, *buf; |