[PATCH 01/10] d3dx9: Avoid double freeing samplers.
Matteo Bruni
matteo.mystral at gmail.com
Tue Nov 12 12:48:20 CST 2019
First of all, apologies for not looking into this series in detail
yet. I have a bunch of questions though.
On Thu, Nov 7, 2019 at 10:18 PM Paul Gofman <gofmanp at gmail.com> wrote:
>
> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
> dlls/d3dx9_36/effect.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
> index e69a1fd1f8..980313182a 100644
> --- a/dlls/d3dx9_36/effect.c
> +++ b/dlls/d3dx9_36/effect.c
> @@ -517,7 +517,6 @@ 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);
> @@ -557,7 +556,7 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child)
> break;
> }
> }
> - if (!child)
> + if (!child || is_param_type_sampler(param->type))
> HeapFree(GetProcessHeap(), 0, param->data);
> }
Seems fine but do D3DXPT_STRING parameters also require the same?
More information about the wine-devel
mailing list