mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-25 01:48:18 +02:00
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
1 changed files with 2 additions and 2 deletions
|
|
@ -367,8 +367,8 @@ agx_create_sampler_state(struct pipe_context *pctx,
|
|||
static void
|
||||
agx_delete_sampler_state(struct pipe_context *ctx, void *state)
|
||||
{
|
||||
struct agx_bo *bo = state;
|
||||
agx_bo_unreference(bo);
|
||||
struct agx_sampler_state *so = state;
|
||||
agx_bo_unreference(so->desc);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue