diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:11:43 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:11:43 -0700 |
commit | db5256fb4ad0678ab7f895c40391cb77a3ba40fa (patch) | |
tree | ccb11617298e0aba0f740e9361d7ecc3e6f4135f /fpdfsdk/include | |
parent | cb78ef507c272488fd7e4fd6862014333d8a9de5 (diff) | |
download | pdfium-db5256fb4ad0678ab7f895c40391cb77a3ba40fa.tar.xz |
XFA: Remove more checks for new returning NULL.
This is partially based on https://codereview.chromium.org/1198903002/
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1377733005 .
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/fsdk_mgr.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index b76b16bd07..d53a21e94a 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -239,9 +239,6 @@ class CPDFDoc_Environment final { return L""; char* pbuff = new char[nRequiredLen]; - if (!pbuff) - return L""; - memset(pbuff, 0, nRequiredLen); int nActualLen = m_pInfo->FFI_GetPlatform(m_pInfo, pbuff, nRequiredLen); if (nActualLen <= 0 || nActualLen > nRequiredLen) { @@ -353,8 +350,7 @@ class CPDFDoc_Environment final { FPDF_LPFILEHANDLER fileHandler = m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL); - CFPDF_FileStream* fileStream = new CFPDF_FileStream(fileHandler); - return fileStream; + return new CFPDF_FileStream(fileHandler); } return NULL; } @@ -433,9 +429,6 @@ class CPDFDoc_Environment final { return L""; char* pbuff = new char[nRequiredLen]; - if (!pbuff) - return L""; - memset(pbuff, 0, nRequiredLen); int nActualLen = m_pInfo->FFI_GetLanguage(m_pInfo, pbuff, nRequiredLen); if (nActualLen <= 0 || nActualLen > nRequiredLen) { |