https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53b44b7c4dfa7d985f3053...
commit 53b44b7c4dfa7d985f30536eb95383d0272f8c0f Author: winesync ros-dev@reactos.org AuthorDate: Mon Sep 21 23:01:49 2020 +0200 Commit: Jérôme Gardou jerome.gardou@reactos.org CommitDate: Thu Feb 4 16:37:04 2021 +0100
[WINESYNC] d3dx9: Avoid double freeing samplers.
Signed-off-by: Paul Gofman gofmanp@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id 6aced396bad8bea61733fda24f0cecabaec5041e by Paul Gofman gofmanp@gmail.com --- dll/directx/wine/d3dx9_36/effect.c | 9 ++++----- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index b4d367a50f0..bc6ddb7722d 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -520,8 +520,7 @@ static void free_sampler(struct d3dx_sampler *sampler) { free_state(&sampler->states[i]); } - HeapFree(GetProcessHeap(), 0, sampler->states); - HeapFree(GetProcessHeap(), 0, sampler); + heap_free(sampler->states); }
static void d3dx_pool_release_shared_parameter(struct d3dx_top_level_parameter *param); @@ -535,7 +534,7 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child) switch (param->type) { case D3DXPT_STRING: - HeapFree(GetProcessHeap(), 0, *(char **)param->data); + heap_free(*(char **)param->data); break;
case D3DXPT_TEXTURE: @@ -561,8 +560,8 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child) break; } } - if (!child) - HeapFree(GetProcessHeap(), 0, param->data); + if (!child || is_param_type_sampler(param->type)) + heap_free(param->data); }
static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL child) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 69ffe745351..09bc3e284fe 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: a0a5c64bd5d4240d8a7a9913c77730458262d450} +tags: {wine: 6aced396bad8bea61733fda24f0cecabaec5041e}