diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:56:30 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:56:30 -0700 |
commit | 63d0a52a6af7d327fdb5792f520cc8d93fe2f1bb (patch) | |
tree | f093ef913389ad51bae87c8195822b1dbb8b99da /core/src | |
parent | dcfa0ba2928072c962fe8835d1a2ccd309eafbbd (diff) | |
download | pdfium-63d0a52a6af7d327fdb5792f520cc8d93fe2f1bb.tar.xz |
Fix a leak in PDF_DataDecode() on failure.
Found using the test examples from https://crbug.com/537780
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1376413003 .
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index 402a19ed4a..2d6e9f3436 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -416,6 +416,7 @@ FX_BOOL PDF_DataDecode(const uint8_t* src_buf, FX_Free(last_buf); } if (offset == -1) { + FX_Free(new_buf); return FALSE; } last_buf = new_buf; |