1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 13:24:10 +01:00

[dxvk] Free memory if vkMapMemory fails

Otherwise, we leak the allocated memory chunk and make the
problem even worse than it already is.
This commit is contained in:
Philip Rebohle 2019-07-02 01:26:54 +02:00
parent 1dadba3cce
commit cb806a5d56
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -340,6 +340,7 @@ namespace dxvk {
if (status != VK_SUCCESS) {
Logger::err(str::format("DxvkMemoryAllocator: Mapping memory failed with ", status));
m_vkd->vkFreeMemory(m_vkd->device(), result.memHandle, nullptr);
return DxvkDeviceMemory();
}
}