[PATCH 0/1] MR542: vkd3d: Free mutex in error case in d3d12_command_queue_CopyTileMappings
From: Fabian Maurer <dark.shadow4(a)web.de> --- libs/vkd3d/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 549f6a45f..013b5d075 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -6512,7 +6512,7 @@ static void STDMETHODCALLTYPE d3d12_command_queue_CopyTileMappings(ID3D12Command if (!(op = d3d12_command_queue_op_array_require_space(&command_queue->op_queue))) { ERR("Failed to add op.\n"); - return; + goto unlock_mutex; } op->opcode = VKD3D_CS_OP_COPY_MAPPINGS; op->u.copy_mappings.dst_resource = dst_resource_impl; @@ -6524,6 +6524,7 @@ static void STDMETHODCALLTYPE d3d12_command_queue_CopyTileMappings(ID3D12Command d3d12_command_queue_submit_locked(command_queue); +unlock_mutex: vkd3d_mutex_unlock(&command_queue->op_mutex); } -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/542
This merge request was approved by Giovanni Mascellani. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/542
Could we say "unlock" instead of "free" here? The latter suggests calling vkd3d_mutex_destroy() instead of vkd3d_mutex_unlock(). -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/542#note_56921
participants (4)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Giovanni Mascellani (@giomasce) -
Henri Verbeet (@hverbeet)