27 Sep
2018
27 Sep
'18
9:51 p.m.
On 27 September 2018 at 15:00, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
@@ -1149,12 +1144,17 @@ static HRESULT vkd3d_create_vk_device(struct d3d12_device *device, { ERR("Failed to create queues, hr %#x.\n", hr); device->vk_procs.vkDestroyDevice(vk_device, NULL); - return hr; + goto fail; }
TRACE("Created Vulkan device %p.\n", vk_device);
- return S_OK; +fail: + if (queue_properties) + vkd3d_free(queue_properties); + if (queue_info) + vkd3d_free(queue_info); + return hr; }
I guess this is fine, but I'd feel a little better about it if the label was called e.g. "done" in this case, since we're also going through there on success.