[PATCH] dwrite: check correct variable for NULL (Coverity)

Marcus Meissner marcus at jet.franken.de
Tue Sep 23 01:45:12 CDT 2014


1240029 Logically dead code
1240030 Logically dead code
---
 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;
-- 
1.8.4.5




More information about the wine-patches mailing list