wineps.drv: Fix memory leak.

This commit is contained in:
Pierre Schweitzer 2011-12-06 21:54:42 +01:00 committed by Alexandre Julliard
parent 1ac7096728
commit 0652bbc3d5

View file

@ -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 */