gallium: Catch errors from posix_memalign.
This commit is contained in:
@@ -213,7 +213,8 @@ align_malloc(size_t bytes, uint alignment)
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_POSIX_MEMALIGN)
|
#if defined(HAVE_POSIX_MEMALIGN)
|
||||||
void *mem;
|
void *mem;
|
||||||
(void) posix_memalign(& mem, alignment, bytes);
|
if(posix_memalign(& mem, alignment, bytes) != 0)
|
||||||
|
return NULL;
|
||||||
return mem;
|
return mem;
|
||||||
#else
|
#else
|
||||||
char *ptr, *buf;
|
char *ptr, *buf;
|
||||||
|
Reference in New Issue
Block a user