[PATCH 0/2] MR7675: d3dxof: Fix some memory leaks.
From: Sven Baars <sbaars(a)codeweavers.com> --- dlls/d3dxof/d3dxof.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 9ed02e1bdf9..250af38c895 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -148,7 +148,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV if (hFile == INVALID_HANDLE_VALUE) { TRACE("File '%s' not found\n", (char*)pvSource); - return DXFILEERR_FILENOTFOUND; + hr = DXFILEERR_FILENOTFOUND; + goto error; } file_size = GetFileSize(hFile, NULL); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7675
From: Sven Baars <sbaars(a)codeweavers.com> --- dlls/d3dxof/tests/d3dxof.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c index 820afd87426..e798940e576 100644 --- a/dlls/d3dxof/tests/d3dxof.c +++ b/dlls/d3dxof/tests/d3dxof.c @@ -1161,7 +1161,7 @@ static void test_dump(void) if (!pDirectXFileCreate) { win_skip("DirectXFileCreate is not available\n"); - goto exit; + return; } /* Dump data only if there is an object and a template */ @@ -1207,10 +1207,9 @@ static void test_dump(void) ref = IDirectXFile_Release(lpDirectXFile); ok(!ref, "Unexpected refcount %lu.\n", ref); - CloseHandle(hFile); - exit: HeapFree(GetProcessHeap(), 0, pvData); + CloseHandle(hFile); } START_TEST(d3dxof) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7675
This merge request was approved by Matteo Bruni. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7675
participants (3)
-
Matteo Bruni (@Mystral) -
Sven Baars -
Sven Baars (@sbaars)