From: Michal Krol Date: Thu, 14 Feb 2008 16:36:47 +0000 (+0100) Subject: gallium: Use align_free() to free aligned memories. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a7820d31f9b697888ce9f9b193bacc86e646fe1;p=mesa.git gallium: Use align_free() to free aligned memories. --- diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c index c1b7759874c..9e8244f909b 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c @@ -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; }