summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorQin Zhao <zhaoqin@google.com>2015-10-20 18:20:11 -0400
committerQin Zhao <zhaoqin@google.com>2015-10-20 18:20:11 -0400
commit0223be82e0afcfee7c501ad2754230353bff79ff (patch)
treed48eda107907d9ca663f74d7a2132e9f34ef4db2 /samples/pdfium_test.cc
parentb5dd65f31408dc8c15d202cbb3e8d9ec2afd4520 (diff)
downloadpdfium-0223be82e0afcfee7c501ad2754230353bff79ff.tar.xz
Fix pdfium-i#236: memory leaks from RenderPdf
- add FPDFAvail_Destroy(pdf_avail) on the early return path in RenderPdf R=thestig@chromium.org BUG=pdfium:236 Review URL: https://codereview.chromium.org/1410333007 .
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 10504251c7..66dd3f2f1b 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -391,6 +391,7 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
if (!doc) {
fprintf(stderr, "Load pdf docs unsuccessful.\n");
+ FPDFAvail_Destroy(pdf_avail);
return;
}