Nikolay Sivov : usp10/tests: Fix some leaks on error path (Valgrind).
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 16 07:56:27 CDT 2015
Module: wine
Branch: master
Commit: c7b5a2f8510bba50922d33a0aa4d2a6466a2bf12
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c7b5a2f8510bba50922d33a0aa4d2a6466a2bf12
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Apr 15 07:48:34 2015 +0300
usp10/tests: Fix some leaks on error path (Valgrind).
---
dlls/usp10/tests/usp10.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 7c26c51..39240f5 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -756,7 +756,7 @@ static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
else if (hr != S_OK)
winetest_trace("ScriptShapeOpenType failed (%x)\n",hr);
if (FAILED(hr))
- return;
+ goto cleanup;
for (x = 0; x < cchString; x++)
{
@@ -808,6 +808,7 @@ static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
winetest_trace("%i: fZeroWidth incorrect (%i)\n",x,glyphProp[x].sva.fZeroWidth);
}
+cleanup:
HeapFree(GetProcessHeap(),0,logclust);
HeapFree(GetProcessHeap(),0,charProp);
HeapFree(GetProcessHeap(),0,glyphs);
More information about the wine-cvs
mailing list