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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21781>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user