fix memory leak in FontFreeType::create (#18503)

This commit is contained in:
will 2017-11-30 16:45:48 +08:00 committed by minggo
parent 5f8fde8669
commit 966483be30
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ FontFreeType * FontFreeType::create(const std::string &fontName, float fontSize,
delete tempFont;
return nullptr;
}
tempFont->autorelease();
return tempFont;
}