[PATCH vkd3d 06/10] libs/vkd3d: Fix memory leak in d3d12_pipeline_state_init_compute_uav_counters().
Józef Kucia
joseph.kucia at gmail.com
Fri Apr 13 05:37:40 CDT 2018
From: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
libs/vkd3d/state.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 1749c007a77d..b89f854601b8 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));
--
2.16.1
More information about the wine-devel
mailing list