Pierre Schweitzer : wineps.drv: Fix memory leak.
Alexandre Julliard
julliard at winehq.org
Wed Dec 7 13:57:13 CST 2011
Module: wine
Branch: master
Commit: 0652bbc3d56b7e63f8188598da65bf4f06b2a244
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0652bbc3d56b7e63f8188598da65bf4f06b2a244
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Tue Dec 6 21:54:42 2011 +0100
wineps.drv: Fix memory leak.
---
dlls/wineps.drv/download.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c
index 6996205..6af4841 100644
--- a/dlls/wineps.drv/download.c
+++ b/dlls/wineps.drv/download.c
@@ -258,15 +258,18 @@ BOOL PSDRV_WriteSetDownloadFont(PHYSDEV dev)
assert(physDev->font.fontloc == Download);
+ if (!GetObjectW( GetCurrentObject(dev->hdc, OBJ_FONT), sizeof(lf), &lf ))
+ return FALSE;
+
potm = HeapAlloc(GetProcessHeap(), 0, len);
+ if (!potm)
+ return FALSE;
+
GetOutlineTextMetricsA(dev->hdc, len, potm);
get_download_name(dev, potm, &ps_name);
physDev->font.fontinfo.Download = is_font_downloaded(physDev, ps_name);
- if (!GetObjectW( GetCurrentObject(dev->hdc, OBJ_FONT), sizeof(lf), &lf ))
- return FALSE;
-
ppem = calc_ppem_for_height(dev->hdc, lf.lfHeight);
/* Retrieve the world -> device transform */
More information about the wine-cvs
mailing list