[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
1 changed files with 1 additions and 0 deletions

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();
}
}