aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-08-24 17:45:16 -0700
committerChris Robinson <[email protected]>2012-08-24 17:45:16 -0700
commit3b735cc34a06da039f3514a0eca244923a8dbea5 (patch)
treed0e2ce137c5cb835015fcf018b31f0e712d83442
parent238caa1492b63e11f7884d45f7dd5228cabbc8aa (diff)
Use _aligned_free for pointers returned by _aligned_malloc
-rw-r--r--Alc/helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index f18d36e4..80d8e0e4 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -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)
{