d3dx9: Always free samplers (Valgrind).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2019-05-25 13:59:50 +02:00 committed by Alexandre Julliard
parent 63443f249f
commit 7dc42119b4
1 changed files with 2 additions and 1 deletions

View File

@ -519,6 +519,7 @@ static void free_sampler(struct d3dx_sampler *sampler)
free_state(&sampler->states[i]);
}
HeapFree(GetProcessHeap(), 0, sampler->states);
HeapFree(GetProcessHeap(), 0, sampler);
}
static void d3dx_pool_release_shared_parameter(struct d3dx_top_level_parameter *param);
@ -551,7 +552,7 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child)
case D3DXPT_SAMPLER3D:
case D3DXPT_SAMPLERCUBE:
free_sampler((struct d3dx_sampler *)param->data);
break;
return;
default:
FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type));