wineps.drv: Fix some memory leaks.

oldstable
Andrew Talbot 2007-10-10 19:57:29 +01:00 committed by Alexandre Julliard
parent bda66cc37a
commit a76d10d1d9
2 changed files with 5 additions and 3 deletions

View File

@ -629,6 +629,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
value_name=NULL;
}
if (value_name) {
HeapFree(PSDRV_Heap, 0, ppdFileName);
ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed);
RegQueryValueExA(hkey, value_name, 0, &ppdType, (LPBYTE)ppdFileName, &needed);
}

View File

@ -314,9 +314,6 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
t42->glyph_sent_size * sizeof(*(t42->glyph_sent)));
}
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(glyph_def) +
strlen(pdl->ps_name) + 100);
if(!get_glyf_pos(t42, index, &start, &end)) return FALSE;
TRACE("start = %x end = %x\n", start, end);
@ -352,6 +349,10 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
for(i = 1; t42->glyf_blocks[i]; i++)
if(start < t42->glyf_blocks[i]) break;
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(glyph_def) +
strlen(pdl->ps_name) + 100);
/* we don't have a string for the gdir and glyf tables, but we do have a
string for the TT header. So the offset we need is tables - 2 */
sprintf(buf, "%d %d\n", t42->num_of_written_tables - 2 + i, start - t42->glyf_blocks[i-1]);