gdi32: Avoid memory leaks (coverity).

This commit is contained in:
André Hentschel 2012-10-28 16:16:37 +01:00 committed by Alexandre Julliard
parent c19dd47643
commit 0f7bc2d8cc
3 changed files with 6 additions and 1 deletions

View File

@ -545,6 +545,9 @@ BOOL BIDI_Reorder(
WARN("Out of memory\n");
HeapFree(GetProcessHeap(), 0, chartype);
HeapFree(GetProcessHeap(), 0, levels);
HeapFree(GetProcessHeap(), 0, run_glyphs);
HeapFree(GetProcessHeap(), 0, pwLogClust);
HeapFree(GetProcessHeap(), 0, psva);
return FALSE;
}
res = ScriptItemize(lpString + done, i, maxItems, &Control, &State, pItems, &nItems);

View File

@ -3741,7 +3741,7 @@ static void test_GdiAlphaBlend(void)
DeleteObject(bmpDst);
ReleaseDC(NULL, hdcNull);
HeapFree(GetProcessHeap(), 0, bmi);
}
static void test_GdiGradientFill(void)
@ -3854,6 +3854,7 @@ static void test_GdiGradientFill(void)
DeleteDC( hdc );
DeleteObject( bmp );
HeapFree(GetProcessHeap(), 0, bmi);
}
static void test_clipping(void)

View File

@ -1308,6 +1308,7 @@ static void compare_hash_broken_todo(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const
if(current_sha1[i] == NULL)
{
ok(current_sha1[i] != NULL, "missing hash, got \"%s\",\n", hash);
HeapFree(GetProcessHeap(), 0, hash);
return;
}
}