Merge to XFA: Fix uninitialized face in fx_ge_font.cpp
authorJUN FANG <jun_fang@foxitsoftware.com>
Thu, 2 Apr 2015 17:05:06 +0000 (10:05 -0700)
committerJUN FANG <jun_fang@foxitsoftware.com>
Thu, 2 Apr 2015 17:07:31 +0000 (10:07 -0700)
MSAN reported this issue when I tried to reproduce 460936 in the last version of freetype on Linux.

BUG=N/A
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1050333002

core/src/fxge/ge/fx_ge_font.cpp

index f702e89..aeaebe8 100644 (file)
@@ -199,7 +199,7 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
         FXFT_Init_FreeType(&CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary);
     }
     library = CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary;
-    FXFT_Face face;
+    FXFT_Face face = NULL;
     int error = FXFT_New_Memory_Face(library, pData, size, 0, &face);
     if (error) {
         return NULL;