mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 22:00:26 +01:00
mesa: check for posix_memalign() errors
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit b1097607db)
This commit is contained in:
parent
9d644e7b95
commit
aa7bf2d88e
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue