asahi: Fix memory unsafety in delete_sampler_state
The type is wrong, masked by a void*, meaning the free is completely wrong. ASan is rightfully unhappy. Fixes crashes destroying the context. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14901>
This commit is contained in:
parent
786871c87e
commit
0299600efb
|
@ -367,8 +367,8 @@ agx_create_sampler_state(struct pipe_context *pctx,
|
||||||
static void
|
static void
|
||||||
agx_delete_sampler_state(struct pipe_context *ctx, void *state)
|
agx_delete_sampler_state(struct pipe_context *ctx, void *state)
|
||||||
{
|
{
|
||||||
struct agx_bo *bo = state;
|
struct agx_sampler_state *so = state;
|
||||||
agx_bo_unreference(bo);
|
agx_bo_unreference(so->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue