dwrite: Avoid leaking filemapping (Coverity).

This commit is contained in:
Marcus Meissner 2014-11-30 10:45:13 +01:00 committed by Alexandre Julliard
parent 1994140f3d
commit 6ea025fc7f
1 changed files with 3 additions and 1 deletions

View File

@ -2228,8 +2228,10 @@ static HRESULT WINAPI localfontfileloader_CreateStreamFromKey(IDWriteLocalFontFi
CloseHandle(mapping);
stream = heap_alloc(sizeof(*stream));
if (!stream)
if (!stream) {
UnmapViewOfFile(file_ptr);
return E_OUTOFMEMORY;
}
stream->key = heap_alloc(key_size);
if (!stream->key) {