summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2015-10-15 16:55:21 -0700
committerOliver Chang <ochang@chromium.org>2015-10-15 16:55:21 -0700
commitfb3c41e5324671bce0b0ec025f4e94ae0b20906e (patch)
treee11addb9a0f3d4dfeca38f6587f1b3862a96b2de /core
parent943ea142b6a7e6edc91fe3c307013129e6eb0ef3 (diff)
downloadpdfium-fb3c41e5324671bce0b0ec025f4e94ae0b20906e.tar.xz
Plug a leak in CPDF_StreamParser::ReadInlineStream
R=thestig@chromium.org, tsepez@chromium.org BUG=pdfium:212 Review URL: https://codereview.chromium.org/1405203002 .
Diffstat (limited to 'core')
-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) {