summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_metadata.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 3780d1587d..5379275544 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -20,9 +20,9 @@ CPDF_Metadata::CPDF_Metadata(CPDF_Document* pDoc) {
if (!pStream)
return;
- CPDF_StreamAcc acc;
- acc.LoadAllData(pStream, false);
- m_pXmlElement = CXML_Element::Parse(acc.GetData(), acc.GetSize());
+ auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
+ pAcc->LoadAllData(false);
+ m_pXmlElement = CXML_Element::Parse(pAcc->GetData(), pAcc->GetSize());
}
CPDF_Metadata::~CPDF_Metadata() {}