summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-07-08 15:30:46 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-07-08 15:30:46 -0700
commit3522876d5291922ddc62bf1b70d02743b0850673 (patch)
treeb3fd7eda6e8ed8f07674f6a6fba21e82ca83bee7 /core/src/fpdfapi/fpdf_edit
parente7ee98e4c6fd56c9e930194e9fc11cc10e8293a1 (diff)
downloadpdfium-3522876d5291922ddc62bf1b70d02743b0850673.tar.xz
Remove custom memory manager
BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 2672116e4f..9985f06dc6 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -543,8 +543,7 @@ static void _CFString2CFXByteString(CFStringRef src, CFX_ByteString &dest)
SInt32 len = CFStringGetLength(src);
CFRange range = CFRangeMake(0, len);
CFIndex used = 0;
- UInt8* pBuffer = (UInt8*)malloc(sizeof(UInt8) * (len + 1));
- FXSYS_memset32(pBuffer, 0, sizeof(UInt8) * (len + 1));
+ UInt8* pBuffer = (UInt8*)calloc(len+1, sizeof(UInt8));
CFStringGetBytes(src, range, kCFStringEncodingASCII, 0, false, pBuffer, len, &used);
dest = (FX_LPSTR)pBuffer;
free(pBuffer);