[PATCH v2 1/9] d3dx10/tests: Fix texture leak in check_resource_data.
Piotr Caban
wine at gitlab.winehq.org
Sat Jun 18 14:17:21 CDT 2022
From: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
---
dlls/d3dx10_43/tests/d3dx10.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 1c28a62b700..ca7ccc3934c 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -1237,7 +1237,7 @@ static void check_resource_data(ID3D10Resource *resource, const struct test_imag
ok_(__FILE__, line)(hr == S_OK, "Map failed, hr %#x.\n", hr);
if (hr != S_OK)
{
- ID3D10Texture2D_Unmap(readback, 0);
+ ID3D10Texture2D_Release(readback);
return;
}
@@ -1253,6 +1253,7 @@ static void check_resource_data(ID3D10Resource *resource, const struct test_imag
}
ID3D10Texture2D_Unmap(readback, 0);
+ ID3D10Texture2D_Release(readback);
}
static void test_D3DX10UnsetAllDeviceObjects(void)
@@ -2062,7 +2063,7 @@ static void test_D3DX10CreateAsyncTextureProcessor(void)
CoUninitialize();
- ID3D10Device_Release(device);
+ ok(!ID3D10Device_Release(device), "device not released.\n");
}
static void test_get_image_info(void)
@@ -2417,7 +2418,7 @@ static void test_create_texture(void)
CoUninitialize();
- ID3D10Device_Release(device);
+ ok(!ID3D10Device_Release(device), "Unexpected refcount.\n");
}
#define check_rect(rect, left, top, right, bottom) _check_rect(__LINE__, rect, left, top, right, bottom)
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/272
More information about the wine-devel
mailing list