Commit 50c8766c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dwrite: Check correct variable for NULL (Coverity).

parent b12381a0
......@@ -1049,7 +1049,7 @@ static HRESULT create_fontfamily(IDWriteLocalizedStrings *familyname, IDWriteFon
This = heap_alloc(sizeof(struct dwrite_fontfamily));
if (!This) return E_OUTOFMEMORY;
This->data = heap_alloc(sizeof(struct dwrite_fontfamily_data));
if (!This)
if (!This->data)
{
heap_free(This);
return E_OUTOFMEMORY;
......@@ -1346,7 +1346,7 @@ HRESULT font_create_fontface(IDWriteFactory *iface, DWRITE_FONT_FACE_TYPE facety
This = heap_alloc(sizeof(struct dwrite_fontface));
if (!This) return E_OUTOFMEMORY;
This->data = heap_alloc(sizeof(struct dwrite_fontface_data));
if (!This)
if (!This->data)
{
heap_free(This);
return E_OUTOFMEMORY;
......
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