Module: wine Branch: master Commit: 91128b901ec308dd86346e971e94f85fb24ba680 URL: http://source.winehq.org/git/wine.git/?a=commit;h=91128b901ec308dd86346e971e...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Tue Oct 9 21:17:24 2007 +0100
wineps.drv: Fix some memory leaks.
---
dlls/wineps.drv/download.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c index 78bdce9..e794af6 100644 --- a/dlls/wineps.drv/download.c +++ b/dlls/wineps.drv/download.c @@ -242,16 +242,18 @@ BOOL PSDRV_WriteSetDownloadFont(PSDRV_PDEVICE *physDev) RECT bbox; UINT emsize;
+ if (!get_bbox(physDev, &bbox, &emsize)) { + HeapFree(GetProcessHeap(), 0, potm); + return FALSE; + } + if(!is_room_for_font(physDev)) + PSDRV_EmptyDownloadList(physDev, TRUE); + pdl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pdl)); pdl->ps_name = HeapAlloc(GetProcessHeap(), 0, strlen(ps_name)+1); strcpy(pdl->ps_name, ps_name); pdl->next = NULL;
- if (!get_bbox(physDev, &bbox, &emsize)) - return FALSE; - if(!is_room_for_font(physDev)) - PSDRV_EmptyDownloadList(physDev, TRUE); - if(physDev->pi->ppd->TTRasterizer == RO_Type42) { pdl->typeinfo.Type42 = T42_download_header(physDev, ps_name, &bbox, emsize); pdl->type = Type42;