Module: wine Branch: master Commit: 50c8766cce35a497370a615e0fcf0b92d4874f8a URL: http://source.winehq.org/git/wine.git/?a=commit;h=50c8766cce35a497370a615e0f...
Author: Marcus Meissner marcus@jet.franken.de Date: Tue Sep 23 08:45:12 2014 +0200
dwrite: Check correct variable for NULL (Coverity).
---
dlls/dwrite/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 6e7de46..25b47ef 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -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;