gallium: Use align_free() to free aligned memories.
authorMichal Krol <michal@tungstengraphics.com>
Thu, 14 Feb 2008 16:36:47 +0000 (17:36 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 15 Feb 2008 02:30:06 +0000 (11:30 +0900)
src/mesa/pipe/pipebuffer/pb_buffer_malloc.c

index c1b7759874c6a3b3e555ff2223d812f7d240eba2..9e8244f909b6917cc4604eea5f0fece240cc1eee 100644 (file)
@@ -110,7 +110,7 @@ pb_malloc_buffer_create(size_t size,
    buf = CALLOC_STRUCT(malloc_buffer);
    if(!buf)
       return NULL;
-   
+
    buf->base.base.refcount = 1;
    buf->base.base.alignment = desc->alignment;
    buf->base.base.usage = desc->usage;
@@ -119,7 +119,7 @@ pb_malloc_buffer_create(size_t size,
 
    buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment);
    if(!buf->data) {
-      FREE(buf);
+      align_free(buf);
       return NULL;
    }