From 0223be82e0afcfee7c501ad2754230353bff79ff Mon Sep 17 00:00:00 2001 From: Qin Zhao Date: Tue, 20 Oct 2015 18:20:11 -0400 Subject: 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 . --- samples/pdfium_test.cc | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3