Module: wine Branch: master Commit: d68dde3751aee645ce4a7b800b875e4060a3d8cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=d68dde3751aee645ce4a7b800b...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Fri Apr 25 13:49:41 2014 +0400
gdiplus/tests: Fix some leaks when running with Wine (Valgrind).
---
dlls/gdiplus/tests/font.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 2b5cf09..b826ba6 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -798,17 +798,23 @@ static void test_font_substitution(void) lf.lfWeight = 0; lf.lfCharSet = 0; lstrcpyA(lf.lfFaceName, "ThisFontShouldNotExist"); + font = NULL; status = GdipCreateFontFromLogfontA(hdc, &lf, &font); todo_wine ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */ "expected NotTrueTypeFont, got %d\n", status); + /* FIXME: remove when wine is fixed */ + if (font) GdipDeleteFont(font);
/* empty FaceName */ lf.lfFaceName[0] = 0; + font = NULL; status = GdipCreateFontFromLogfontA(hdc, &lf, &font); todo_wine ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */ "expected NotTrueTypeFont, got %d\n", status); + /* FIXME: remove when wine is fixed */ + if (font) GdipDeleteFont(font);
GdipDeleteGraphics(graphics); DeleteDC(hdc);