[PATCH] wined3d: Release the allocator lock on error in wined3d_allocator_chunk_vk_map().

Henri Verbeet hverbeet at codeweavers.com
Fri Dec 17 10:42:17 CST 2021


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
Ideally we'd never get there, of course.

 dlls/wined3d/context_vk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c
index 06162d0c0e8..fd6d810f0e2 100644
--- a/dlls/wined3d/context_vk.c
+++ b/dlls/wined3d/context_vk.c
@@ -273,6 +273,7 @@ void *wined3d_allocator_chunk_vk_map(struct wined3d_allocator_chunk_vk *chunk_vk
             chunk_vk->vk_memory, 0, VK_WHOLE_SIZE, 0, &chunk_vk->c.map_ptr))) < 0)
     {
         ERR("Failed to map chunk memory, vr %s.\n", wined3d_debug_vkresult(vr));
+        wined3d_allocator_chunk_vk_unlock(chunk_vk);
         return NULL;
     }
 
-- 
2.30.2




More information about the wine-devel mailing list