mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-01 01:54:26 +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:
parent
1dadba3cce
commit
cb806a5d56
@ -340,6 +340,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (status != VK_SUCCESS) {
|
if (status != VK_SUCCESS) {
|
||||||
Logger::err(str::format("DxvkMemoryAllocator: Mapping memory failed with ", status));
|
Logger::err(str::format("DxvkMemoryAllocator: Mapping memory failed with ", status));
|
||||||
|
m_vkd->vkFreeMemory(m_vkd->device(), result.memHandle, nullptr);
|
||||||
return DxvkDeviceMemory();
|
return DxvkDeviceMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user