Mesa (main): tc: CPU storage needs to be freed with align_free

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 8 21:13:47 UTC 2022


Module: Mesa
Branch: main
Commit: 7ec0e2b89351e6e56cb112e00e6c68c6bbc6faea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ec0e2b89351e6e56cb112e00e6c68c6bbc6faea

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Mon Feb  7 19:03:04 2022 -0800

tc: CPU storage needs to be freed with align_free

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>

---

 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;
    }
 }



More information about the mesa-commit mailing list