gallium: Catch errors from posix_memalign.

This commit is contained in:
José Fonseca
2008-08-14 09:44:49 +01:00
parent 50c6092355
commit a8540ef9fb

View File

@@ -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;