wineps: Avoid memory leaks (coverity).

This commit is contained in:
André Hentschel 2012-10-30 20:07:15 +01:00 committed by Alexandre Julliard
parent 4ee73e69b5
commit 42f791ccd5
2 changed files with 5 additions and 3 deletions

View File

@ -313,9 +313,10 @@ BOOL PSDRV_WriteSetDownloadFont(PHYSDEV dev)
UINT emsize;
if (!get_bbox(dev->hdc, &bbox, &emsize)) {
HeapFree(GetProcessHeap(), 0, potm);
return FALSE;
}
HeapFree(GetProcessHeap(), 0, ps_name);
HeapFree(GetProcessHeap(), 0, potm);
return FALSE;
}
if(!is_room_for_font(physDev))
PSDRV_EmptyDownloadList(dev, TRUE);

View File

@ -385,6 +385,7 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
strlen(escaped_title) + 30 );
if(!buf) {
WARN("HeapAlloc failed\n");
HeapFree(GetProcessHeap(), 0, escaped_title);
return 0;
}