mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 20:10:14 +01:00
radeonsi: clear the debug callback on ctx destroy
The debug callback depends on the context to operate properly, so we need to clear it on destroy to avoid a use-after-free. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035 Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
This commit is contained in:
parent
71cb394b02
commit
59a3f38ff6
1 changed files with 2 additions and 0 deletions
|
|
@ -194,6 +194,8 @@ static void si_destroy_context(struct pipe_context *context)
|
|||
{
|
||||
struct si_context *sctx = (struct si_context *)context;
|
||||
|
||||
context->set_debug_callback(context, NULL);
|
||||
|
||||
util_unreference_framebuffer_state(&sctx->framebuffer.state);
|
||||
si_release_all_descriptors(sctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue