Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: fpdfsdk/fpdfeditimg.cpp

Issue 2194393002: Fix a leak with FPDFPageObj_NewImgeObj(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_imageobject.h ('k') | fpdfsdk/fpdfeditimg_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfeditimg.cpp
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index cd283019770dde11f2c71674824435e513a219d8..da3d33eb05f47773878afd2d5197440969ee1ac8 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -19,7 +19,7 @@ FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) {
return nullptr;
CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
- pImageObj->m_pImage = new CPDF_Image(pDoc);
+ pImageObj->SetOwnedImage(WrapUnique(new CPDF_Image(pDoc)));
return pImageObj;
}
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_imageobject.h ('k') | fpdfsdk/fpdfeditimg_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698