Fix coverity defects in FontHost_FreeType
authorvandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 28 Mar 2012 21:24:27 +0000 (21:24 +0000)
committervandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 28 Mar 2012 21:24:27 +0000 (21:24 +0000)
Reviewed in https://codereview.appspot.com/5940049/

Review URL: https://codereview.appspot.com/5942043

git-svn-id: http://skia.googlecode.com/svn/trunk@3536 2bbb7eff-a529-9590-31e7-b0007b416f81

src/ports/SkFontHost_FreeType.cpp

index b16f781..025c686 100644 (file)
@@ -227,7 +227,7 @@ extern "C" {
 }
 
 SkFaceRec::SkFaceRec(SkStream* strm, uint32_t fontID)
-        : fSkStream(strm), fFontID(fontID) {
+        : fNext(NULL), fSkStream(strm), fRefCnt(1), fFontID(fontID) {
 //    SkDEBUGF(("SkFaceRec: opening %s (%p)\n", key.c_str(), strm));
 
     sk_bzero(&fFTStream, sizeof(fFTStream));
@@ -287,7 +287,6 @@ static SkFaceRec* ref_ft_face(uint32_t fontID) {
         //fprintf(stderr, "Opened font '%s'\n", filename.c_str());
         rec->fNext = gFaceRecHead;
         gFaceRecHead = rec;
-        rec->fRefCnt = 1;
         return rec;
     }
 }