summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2015-10-15 17:27:14 -0700
committerOliver Chang <ochang@chromium.org>2015-10-15 17:27:14 -0700
commitef66fb6d7196993016f0571d4d1253dd78900d2f (patch)
tree705648ad5e0aa415d3e60d6270a3895071b2ba10
parentc2f38e93f5f456fda392f1f8b6b4a17dbd5fd971 (diff)
downloadpdfium-ef66fb6d7196993016f0571d4d1253dd78900d2f.tar.xz
Merge to XFA: Plug a leak in CPDF_StreamParser::ReadInlineStream
R=tsepez@chromium.org, thestig@chromium.org BUG=pdfium:212 Review URL: https://codereview.chromium.org/1405203002 . (cherry picked from commit fb3c41e5324671bce0b0ec025f4e94ae0b20906e) Review URL: https://codereview.chromium.org/1406103002 .
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index ace7bf925b..b1e89e8cc4 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -397,6 +397,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc,
PDF_DecodeInlineStream(m_pBuf + m_Pos, m_Size - m_Pos, width, height,
Decoder, pParam, pData, dwDestSize);
if ((int)dwStreamSize < 0) {
+ FX_Free(pData);
return NULL;
}
if (bDecode) {