projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50fdefc
)
radv: destroy the base object if VkCreateInstance() failed
author
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Sun, 12 Jul 2020 11:40:14 +0000
(13:40 +0200)
committer
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Wed, 15 Jul 2020 11:53:37 +0000
(13:53 +0200)
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/5868>
src/amd/vulkan/radv_device.c
patch
|
blob
|
history
diff --git
a/src/amd/vulkan/radv_device.c
b/src/amd/vulkan/radv_device.c
index 8f2ea1b0def4bf484b2d2a241ad69511f4a8fff3..e1e3c0b8a85f72a6f0d39914ca37d840d8e0725a 100644
(file)
--- a/
src/amd/vulkan/radv_device.c
+++ b/
src/amd/vulkan/radv_device.c
@@
-662,6
+662,7
@@
VkResult radv_CreateInstance(
if (idx >= RADV_INSTANCE_EXTENSION_COUNT ||
!radv_instance_extensions_supported.extensions[idx]) {
+ vk_object_base_finish(&instance->base);
vk_free2(&default_alloc, pAllocator, instance);
return vk_error(instance, VK_ERROR_EXTENSION_NOT_PRESENT);
}
@@
-718,6
+719,7
@@
VkResult radv_CreateInstance(
result = vk_debug_report_instance_init(&instance->debug_report_callbacks);
if (result != VK_SUCCESS) {
+ vk_object_base_finish(&instance->base);
vk_free2(&default_alloc, pAllocator, instance);
return vk_error(instance, result);
}