Commit 106dbd56 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

usp10: Fix some more memory leaks.

parent 66c6b84f
...@@ -640,6 +640,7 @@ static void test_ScriptString(HDC hdc) ...@@ -640,6 +640,7 @@ static void test_ScriptString(HDC hdc)
ReqWidth, &Control, &State, Dx, &Tabdef, ReqWidth, &Control, &State, Dx, &Tabdef,
&InClass, &ssa); &InClass, &ssa);
ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr); 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 */ /* test makes sure that a call with a valid pssa still works */
hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags, hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags,
...@@ -844,8 +845,9 @@ static void test_ScriptCacheGetHeight(HDC hdc) ...@@ -844,8 +845,9 @@ static void test_ScriptCacheGetHeight(HDC hdc)
hr = ScriptCacheGetHeight(hdc, &sc, &height); hr = ScriptCacheGetHeight(hdc, &sc, &height);
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
ok(height > 0, "expected height > 0\n"); ok(height > 0, "expected height > 0\n");
ScriptFreeCache(&sc);
} }
static void test_ScriptGetGlyphABCWidth(HDC hdc) static void test_ScriptGetGlyphABCWidth(HDC hdc)
...@@ -867,6 +869,8 @@ static void test_ScriptGetGlyphABCWidth(HDC hdc) ...@@ -867,6 +869,8 @@ static void test_ScriptGetGlyphABCWidth(HDC hdc)
hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', &abc); hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', &abc);
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
ScriptFreeCache(&sc);
} }
static void test_ScriptLayout(void) static void test_ScriptLayout(void)
......
...@@ -660,6 +660,7 @@ error: ...@@ -660,6 +660,7 @@ error:
usp_free(analysis->glyphs); usp_free(analysis->glyphs);
usp_free(analysis->logattrs); usp_free(analysis->logattrs);
usp_free(analysis->pItem); usp_free(analysis->pItem);
usp_free(analysis->sc);
usp_free(analysis); usp_free(analysis);
return hr; return hr;
} }
...@@ -887,6 +888,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) ...@@ -887,6 +888,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
usp_free(analysis->pItem); usp_free(analysis->pItem);
usp_free(analysis->logattrs); usp_free(analysis->logattrs);
usp_free(analysis->sz); usp_free(analysis->sz);
usp_free(analysis->sc);
usp_free(analysis); usp_free(analysis);
if (invalid) return E_INVALIDARG; if (invalid) return E_INVALIDARG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment