radv: Fix possible invalid free of dynamic descriptors
authorAlex Smith <asmith@feralinteractive.com>
Wed, 12 Jul 2017 10:14:21 +0000 (11:14 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 12 Jul 2017 22:21:20 +0000 (00:21 +0200)
This free was left in after dynamic descriptors were changed to not be
allocated separately from the descriptor set, and can cause a crash.

Fixes: 39644fa40a3 ("radv: Don't allocate dynamic descriptors separately")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_descriptor_set.c

index ec7fd3d8cc80c48651a0558383689beadd4872c0..b482843539d986a85ab699ab004eadac07093ecb 100644 (file)
@@ -317,7 +317,6 @@ radv_descriptor_set_create(struct radv_device *device,
                        }
 
                        if (pool->size - offset < layout_size) {
-                               vk_free2(&device->alloc, NULL, set->dynamic_descriptors);
                                vk_free2(&device->alloc, NULL, set);
                                return vk_error(VK_ERROR_OUT_OF_POOL_MEMORY_KHR);
                        }