Module: wine Branch: master Commit: 106dbd5617197a0e4d52ea373eaa5c6d0df7c2b5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=106dbd5617197a0e4d52ea373e...
Author: Hans Leidekker hans@it.vu.nl Date: Thu Nov 8 19:18:30 2007 +0100
usp10: Fix some more memory leaks.
---
dlls/usp10/tests/usp10.c | 6 +++++- dlls/usp10/usp10.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 73615de..158f201 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -640,6 +640,7 @@ static void test_ScriptString(HDC hdc) ReqWidth, &Control, &State, Dx, &Tabdef, &InClass, &ssa); ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr); + ScriptStringFree(&ssa);
/* test makes sure that a call with a valid pssa still works */ hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags, @@ -844,8 +845,9 @@ static void test_ScriptCacheGetHeight(HDC hdc)
hr = ScriptCacheGetHeight(hdc, &sc, &height); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(height > 0, "expected height > 0\n"); + + ScriptFreeCache(&sc); }
static void test_ScriptGetGlyphABCWidth(HDC hdc) @@ -867,6 +869,8 @@ static void test_ScriptGetGlyphABCWidth(HDC hdc)
hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', &abc); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + + ScriptFreeCache(&sc); }
static void test_ScriptLayout(void) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 3e1258d..576b056 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -660,6 +660,7 @@ error: usp_free(analysis->glyphs); usp_free(analysis->logattrs); usp_free(analysis->pItem); + usp_free(analysis->sc); usp_free(analysis); return hr; } @@ -887,6 +888,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) usp_free(analysis->pItem); usp_free(analysis->logattrs); usp_free(analysis->sz); + usp_free(analysis->sc); usp_free(analysis);
if (invalid) return E_INVALIDARG;