Adam Petaccia : gdiplus: Valgrind: fix warnings about using uninitialized memory, and leaking memory.
Alexandre Julliard
julliard at winehq.org
Mon Jul 7 09:19:31 CDT 2008
Module: wine
Branch: master
Commit: 7e245060ef73aa37d5924551d62ae23c5ad477e2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e245060ef73aa37d5924551d62ae23c5ad477e2
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Thu Jul 3 14:25:41 2008 -0400
gdiplus: Valgrind: fix warnings about using uninitialized memory, and leaking memory.
---
dlls/gdiplus/font.c | 3 +++
dlls/gdiplus/tests/font.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 78de0a6..6319252 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -370,6 +370,9 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
hdc = GetDC(0);
lstrcpynW(lfw.lfFaceName, name, sizeof(WCHAR) * LF_FACESIZE);
+ lfw.lfCharSet = DEFAULT_CHARSET;
+ lfw.lfEscapement = lfw.lfOrientation = 0;
+
hFont = CreateFontIndirectW (&lfw);
hfont_old = SelectObject(hdc, hFont);
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 59a8d53..1aed45f 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -76,6 +76,8 @@ static void test_createfont(void)
expect (i, unit);
GdipDeleteFont(font);
}
+
+ GdipDeleteFontFamily(fontfamily);
}
static void test_logfont(void)
More information about the wine-cvs
mailing list