Use _aligned_free for pointers returned by _aligned_malloc
This commit is contained in:
parent
238caa1492
commit
3b735cc34a
@ -150,8 +150,10 @@ void *al_calloc(size_t alignment, size_t size)
|
||||
|
||||
void al_free(void *ptr)
|
||||
{
|
||||
#if defined(HAVE_ALIGNED_ALLOC) || defined(HAVE_POSIX_MEMALIGN) || defined(HAVE__ALIGNED_MALLOC)
|
||||
#if defined(HAVE_ALIGNED_ALLOC) || defined(HAVE_POSIX_MEMALIGN)
|
||||
free(ptr);
|
||||
#elif defined(HAVE__ALIGNED_MALLOC)
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
if(ptr != NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user