summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-05-13 01:05:43 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-05-13 01:05:43 +0200
commitb5ca57dbfecd9e680b3bd4b293b0eac400d24cfb (patch)
treeda86a50ab83255adb4f11d24a6e8f5c60e469391
parentb21c5f7741bb0af47c64c042a8586d922d26b47a (diff)
Fix memory leak in XRef::constructXRef
-rw-r--r--poppler/XRef.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index f32546ea..10526017 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -865,6 +865,7 @@ GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) {
bool oneCycle = true;
int offset = 0;
+ resize(0); // free entries properly
gfree(entries);
capacity = 0;
size = 0;