Józef Kucia : libs/vkd3d: Fix memory leak in d3d12_pipeline_state_init_compute_uav_counters().
Module: vkd3d Branch: master Commit: 8b8128b05596a897cd37d815872a77c90734edce URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=8b8128b05596a897cd37d815... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Apr 13 12:37:40 2018 +0200 libs/vkd3d: Fix memory leak in d3d12_pipeline_state_init_compute_uav_counters(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 1749c00..b89f854 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1321,7 +1321,10 @@ static HRESULT d3d12_pipeline_state_init_compute_uav_counters(struct d3d12_pipel if (!(binding_desc = vkd3d_calloc(uav_counter_count, sizeof(*binding_desc)))) return E_OUTOFMEMORY; if (!(state->uav_counters = vkd3d_calloc(uav_counter_count, sizeof(*state->uav_counters)))) + { + vkd3d_free(binding_desc); return E_OUTOFMEMORY; + } state->uav_counter_mask = shader_info->uav_counter_mask; memset(&context, 0, sizeof(context));
participants (1)
-
Alexandre Julliard