mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 00:40:32 +01:00
gallium: Catch errors from posix_memalign.
This commit is contained in:
parent
50c6092355
commit
a8540ef9fb
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue