Use _aligned_free for pointers returned by _aligned_malloc

This commit is contained in:
Chris Robinson 2012-08-24 17:45:16 -07:00
parent 238caa1492
commit 3b735cc34a

View File

@ -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)
{