summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/cfdf_document.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-19 14:05:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-19 14:05:05 -0700
commitc8544d634a1993e2592e41458be215fcd0956031 (patch)
treee71b04e3ceea55454d8b8f48d1750117f347f958 /core/fpdfapi/fpdf_parser/cfdf_document.cpp
parentc6c2e36f59f54b17d9e2c54a2003166e79ccb5e6 (diff)
downloadpdfium-c8544d634a1993e2592e41458be215fcd0956031.tar.xz
Make CPDF_IndirectObjectHolder use unique_ptr to objects
The objects it is given are owned by it and are simply deleted without regard to Release() used by others. Review-Url: https://codereview.chromium.org/2350263002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cfdf_document.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/cfdf_document.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_parser/cfdf_document.cpp b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
index 0182948173..92b20cafd8 100644
--- a/core/fpdfapi/fpdf_parser/cfdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
@@ -90,7 +90,8 @@ FX_BOOL CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const {
buf << "%FDF-1.2\r\n";
for (const auto& pair : *this)
- buf << pair.first << " 0 obj\r\n" << pair.second << "\r\nendobj\r\n\r\n";
+ buf << pair.first << " 0 obj\r\n"
+ << pair.second.get() << "\r\nendobj\r\n\r\n";
buf << "trailer\r\n<</Root " << m_pRootDict->GetObjNum()
<< " 0 R>>\r\n%%EOF\r\n";