summaryrefslogtreecommitdiff
path: root/xfa/fgas/font
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fgas/font
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz
Do not check pointers before deleting them.
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fgas/font')
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 54dd641319..e840cb2bdd 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -624,18 +624,14 @@ void CFX_FontMgrImp::Release() {
uint32_t dwHash;
CFX_FontDescriptorInfos* pDescs;
m_Hash2CandidateList.GetNextAssoc(pos, dwHash, pDescs);
- if (NULL != pDescs) {
- delete pDescs;
- }
+ delete pDescs;
}
pos = m_Hash2Fonts.GetStartPosition();
while (pos) {
uint32_t dwHash;
CFX_ArrayTemplate<IFX_Font*>* pFonts;
m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts);
- if (NULL != pFonts) {
- delete pFonts;
- }
+ delete pFonts;
}
m_Hash2Fonts.RemoveAll();
pos = m_Hash2FileAccess.GetStartPosition();
@@ -1207,9 +1203,7 @@ void CFX_FontMgrImp::ClearFontCache() {
uint32_t dwHash;
CFX_FontDescriptorInfos* pDescs;
m_Hash2CandidateList.GetNextAssoc(pos, dwHash, pDescs);
- if (NULL != pDescs) {
- delete pDescs;
- }
+ delete pDescs;
}
pos = m_FileAccess2IFXFont.GetStartPosition();
while (pos) {