Commit 6ea025fc authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dwrite: Avoid leaking filemapping (Coverity).

parent 1994140f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment