radv: fix accessing NULL pointers when destroy the VRS image
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 26 Nov 2021 15:14:30 +0000 (16:14 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 29 Nov 2021 07:55:02 +0000 (08:55 +0100)
commita58f68fc68fae9c60c56c9111244212facbbd7d4
tree4a8f2578d8c48cd3e42350797bfb453307ce7916
parent6923dd687c114b197c0844b24cab095404450714
radv: fix accessing NULL pointers when destroy the VRS image

Detected by UBSAN.

../src/amd/vulkan/radv_private.h:2939:1: runtime error: member access
within null pointer of type 'struct radv_device_memory'

../src/amd/vulkan/radv_private.h:2926:1: runtime error: member access
within null pointer of type 'struct radv_buffer'

../src/amd/vulkan/radv_private.h:2945:1: runtime error: member access
within null pointer of type 'struct radv_image'

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13965>
src/amd/vulkan/radv_device.c