54077d9893
When running the Vulkan CTS test dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic , the driver sometimes crashes because of cleaning up sequences try to do pvr_suballoc_bo_free() on bo's that is never initialized (thus old stale value remains as pointer). Fix the issues that lead to wild pointers access (a wrong cleanup sequence and trying to free bo's that fails to be allocated). The CTS test still fails here with "Allocations still remain, failed on index 4274", but at least it does not crash now. Reviewed-by: Frank Binns <frank.binns@imgtec.com> Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38506>