summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-08-09 15:46:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-09 15:46:20 -0700
commitdc359b03ab6a70ee52a91119ff6704cae92f4809 (patch)
tree131cb9b1846f4be24c9cb7c54b30975c6a858071 /core/fpdfapi/fpdf_edit
parent39ba18a64283ef3fc3c4aedf537a09835f90862e (diff)
downloadpdfium-dc359b03ab6a70ee52a91119ff6704cae92f4809.tar.xz
Fix a leak with FPDFPageObj_NewImgeObj().
BUG=pdfium:545 Review-Url: https://codereview.chromium.org/2194393002
Diffstat (limited to 'core/fpdfapi/fpdf_edit')
-rw-r--r--core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
index a85591ceef..0e4bab1ae1 100644
--- a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
@@ -99,12 +99,12 @@ void CPDF_PageContentGenerator::ProcessImage(CFX_ByteTextBuf& buf,
uint32_t dwSavedObjNum = pStream->GetObjNum();
CFX_ByteString name = RealizeResource(pStream, "XObject");
if (dwSavedObjNum == 0) {
- pImage->Release();
- pImageObj->m_pImage = m_pDocument->GetPageData()->GetImage(pStream);
+ pImageObj->SetUnownedImage(m_pDocument->GetPageData()->GetImage(pStream));
}
buf << "/" << PDF_NameEncode(name) << " Do Q\n";
}
}
+
void CPDF_PageContentGenerator::ProcessForm(CFX_ByteTextBuf& buf,
const uint8_t* data,
uint32_t size,