From c65948a34b1c9b72df2c2f82f73810f7eaea76fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 7 Mar 2023 18:14:57 +0100 Subject: [PATCH] crocus: Use ralloc_free for memory allocated with rzalloc Pointed out by GCC with LTO: ../src/gallium/drivers/crocus/crocus_context.c: In function 'crocus_create_context': ../src/gallium/drivers/crocus/crocus_context.c:261:7: error: 'free' called on pointer 'block_174' with nonzero offset 48 [-Werror=free-nonheap-object] 261 | free(ctx); | ^ v2: * Use ice pointer instead of ctx. (Karol Herbst) Part-of: --- src/gallium/drivers/crocus/crocus_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_context.c b/src/gallium/drivers/crocus/crocus_context.c index 77ddb2e..56e4810 100644 --- a/src/gallium/drivers/crocus/crocus_context.c +++ b/src/gallium/drivers/crocus/crocus_context.c @@ -258,7 +258,7 @@ crocus_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags) ctx->stream_uploader = u_upload_create_default(ctx); if (!ctx->stream_uploader) { - free(ctx); + ralloc_free(ice); return NULL; } ctx->const_uploader = ctx->stream_uploader; -- 2.7.4