From 7ec0e2b89351e6e56cb112e00e6c68c6bbc6faea Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 7 Feb 2022 19:03:04 -0800 Subject: [PATCH] tc: CPU storage needs to be freed with align_free Cc: mesa-stable Acked-by: Mike Blumenkrantz Reviewed-by: Sil Vilerino Part-of: --- src/gallium/auxiliary/util/u_threaded_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h index ed375558ce8..20bc533503f 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.h +++ b/src/gallium/auxiliary/util/u_threaded_context.h @@ -199,6 +199,7 @@ #include "pipe/p_state.h" #include "util/bitset.h" #include "util/u_inlines.h" +#include "util/u_memory.h" #include "util/u_queue.h" #include "util/u_range.h" #include "util/u_thread.h" @@ -609,7 +610,7 @@ tc_buffer_disable_cpu_storage(struct pipe_resource *buf) struct threaded_resource *tres = threaded_resource(buf); if (tres->cpu_storage) { - free(tres->cpu_storage); + align_free(tres->cpu_storage); tres->cpu_storage = NULL; } }