From 3b735cc34a06da039f3514a0eca244923a8dbea5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 24 Aug 2012 17:45:16 -0700 Subject: Use _aligned_free for pointers returned by _aligned_malloc --- Alc/helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Alc/helpers.c') 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) { -- cgit v1.2.3