diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 0df378004d2..2197c64090f 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -1365,8 +1365,8 @@ static void Direct3D1Test(void) /* Interface consistency check. */ hr = IDirect3DDevice_GetDirect3D(Direct3DDevice1, &Direct3D_alt); ok(hr == D3D_OK, "IDirect3DDevice_GetDirect3D failed: %08x\n", hr); - if (hr == D3D_OK) - ok(Direct3D_alt == Direct3D1, "Direct3D1 struct pointer missmatch: %p != %p\n", Direct3D_alt, Direct3D1); + ok(Direct3D_alt == Direct3D1, "Direct3D1 struct pointer missmatch: %p != %p\n", Direct3D_alt, Direct3D1); + IDirect3D_Release(Direct3D_alt); memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index b1a2940af96..1bbf5ccf167 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -3159,6 +3159,8 @@ static void GetDCTest(void) hr = IDirectDrawSurface4_ReleaseDC(surf4, dc); ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + IDirectDrawSurface_Release(tmp); + dc = CreateCompatibleDC(NULL); ok(!!dc, "CreateCompatibleDC failed.\n"); @@ -3175,11 +3177,12 @@ static void GetDCTest(void) ok(!tmp, "Expected surface NULL, got %p.\n", tmp); IDirectDrawSurface4_Release(surf4); + IDirectDrawSurface_Release(surf); IDirectDraw4_Release(dd4); hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); - surf = NULL; + hr = IDirectDraw7_CreateSurface(dd7, &ddsd2, &surf7, NULL); ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed: 0x%08x\n", hr); dctest_surf((IDirectDrawSurface *) surf7, 2);