From ef66fb6d7196993016f0571d4d1253dd78900d2f Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 15 Oct 2015 17:27:14 -0700 Subject: 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 . --- core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/src/fpdfapi') 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) { -- cgit v1.2.3