Nikolay Sivov : gdiplus/tests: Fix some leaks when running with Wine ( Valgrind).

Alexandre Julliard julliard at winehq.org
Fri Apr 25 14:15:25 CDT 2014


Module: wine
Branch: master
Commit: d68dde3751aee645ce4a7b800b875e4060a3d8cb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d68dde3751aee645ce4a7b800b875e4060a3d8cb

Author: Nikolay Sivov <nsivov at 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);




More information about the wine-cvs mailing list