summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-03-04 13:41:38 +0100
committerGitHub <noreply@github.com>2020-03-04 13:41:38 +0100
commita0e33e17fbecc321d45306255814f9581504776c (patch)
tree966803124d47a23266ae3f81e57c7cf8f0456521 /drivers
parentf83f1d7c9b299f21f818e0ea28c27345f65bde4b (diff)
parent1f209bfc41ef5f2cd63c961262d5d6fe3e03b55a (diff)
Merge pull request #36733 from qarmin/static_analyzer_fixes
Fixes bugs found by Sonarcloud and Coverity
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 8cea8ebb86..3b0d1f6ac3 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -4182,7 +4182,10 @@ RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_a
descriptor_pool_create_info.poolSizeCount = sizes.size();
descriptor_pool_create_info.pPoolSizes = sizes.ptr();
VkResult res = vkCreateDescriptorPool(device, &descriptor_pool_create_info, NULL, &pool->pool);
- ERR_FAIL_COND_V(res, NULL);
+ if (res) {
+ memdelete(pool);
+ ERR_FAIL_COND_V(res, NULL);
+ }
descriptor_pools[p_key].insert(pool);
}