Skip to content
Snippets Groups Projects
Commit 5bfd1a7e authored by Olivier Fourdan's avatar Olivier Fourdan :tools: Committed by Marge Bot
Browse files

radeonsi: Check aux_context on si_destroy_screen()


The function radeonsi_screen_create_impl() tries to create the
aux_context but doesn't actually check for the returned value from
si_create_context().

Then, on si_destroy_screen() the aux_context is used without actually
checking whether it's a thing or not.

As a result, if for any reason si_create_context() failed, we shall
crash in si_destroy_screen() with a NULL pointer dereference trying to
access ((struct si_context *)sscreen->aux_context)->log.

Simply check for aux_context not being NULL to avoid that crash.

Cc: mesa-stable
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: default avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <!11948>
parent 8be61e8a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment