From: Nikolay Sivov Subject: usp10/tests: Fix some leaks on error path (Valgrind) Message-Id: <552F2FDA.5090100@codeweavers.com> Date: Thu, 16 Apr 2015 06:43:22 +0300 --- From d1b8161c8b1373471c657a95f409e7c554c9e837 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 15 Apr 2015 07:48:34 +0300 Subject: [PATCH] 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); -- 2.1.4