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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21781>
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;