Vincent Povirk : gdiplus: Fix a handle leak in GdipDrawString.

Alexandre Julliard julliard at winehq.org
Wed Mar 9 11:12:48 CST 2011


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Mar  8 16:59:19 2011 -0600

gdiplus: Fix a handle leak in GdipDrawString.

---

 dlls/gdiplus/graphics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 43513c8..e9412c8 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4411,7 +4411,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
     lfw.lfEscapement = lfw.lfOrientation = roundr((angle / M_PI) * 1800.0);
 
     gdifont = CreateFontIndirectW(&lfw);
-    DeleteObject(SelectObject(graphics->hdc, CreateFontIndirectW(&lfw)));
+    DeleteObject(SelectObject(graphics->hdc, gdifont));
 
     if (!format || format->align == StringAlignmentNear)
     {




More information about the wine-cvs mailing list