dwrite: Fixed memory leak on error (Coverity).
This commit is contained in:
parent
00a6a1ac2f
commit
a423cbdd5e
|
@ -1476,8 +1476,10 @@ HRESULT create_font_collection(IDWriteFactory* factory, IDWriteFontFileEnumerato
|
||||||
init_font_data(factory, file, i, face_type, font_data);
|
init_font_data(factory, file, i, face_type, font_data);
|
||||||
|
|
||||||
hr = get_filestream_from_file(file, &stream);
|
hr = get_filestream_from_file(file, &stream);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr)) {
|
||||||
|
heap_free (font_data);
|
||||||
return hr;
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
/* get family name from font file */
|
/* get family name from font file */
|
||||||
name_table = NULL;
|
name_table = NULL;
|
||||||
|
|
Loading…
Reference in New Issue