asahi: Fix memory unsafety in delete_sampler_state
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 6 Feb 2022 20:44:35 +0000 (15:44 -0500)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 6 Feb 2022 20:46:55 +0000 (15:46 -0500)
commit0299600efb904c59c91a69cabfc36cfcf6a9ec61
treeff74665ea7020d876c776cf54a1cc89b9d78ac60
parent786871c87e85082dc329fd477447505c0b4871b5
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>
src/gallium/drivers/asahi/agx_state.c