[poppler] Branch 'poppler-0.10' - 5 commits - poppler/CharCodeToUnicode.cc poppler/UnicodeTypeTable.cc qt4/demos qt/poppler-document.cc qt/poppler-link.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Nov 5 11:54:33 PST 2008
poppler/CharCodeToUnicode.cc | 1 +
poppler/UnicodeTypeTable.cc | 7 +++++--
qt/poppler-document.cc | 4 +++-
qt/poppler-link.cc | 8 +++++++-
qt4/demos/viewer.cpp | 1 +
5 files changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 4ae2c8ef0c585ae1c28d9cb54f147182acc95655
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 5 20:49:01 2008 +0100
[Qt4Demo] Fix leak
diff --git a/qt4/demos/viewer.cpp b/qt4/demos/viewer.cpp
index e1f1d73..64fb187 100644
--- a/qt4/demos/viewer.cpp
+++ b/qt4/demos/viewer.cpp
@@ -236,6 +236,7 @@ void PdfViewer::slotSaveCopy()
QMessageBox msgbox(QMessageBox::Critical, tr("Save Error"), tr("Cannot export to:\n%1").arg(fileName),
QMessageBox::Ok, this);
}
+ delete converter;
}
void PdfViewer::slotAbout()
commit 2dc2d21c9fc91aff994c174f619b58960af5a435
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 5 20:00:01 2008 +0100
Fix crash in case indices is NULL
Putting more than one "logical line" per "real line" is evil, we think if will group it, but does not
diff --git a/poppler/UnicodeTypeTable.cc b/poppler/UnicodeTypeTable.cc
index 3300f21..c0483a5 100644
--- a/poppler/UnicodeTypeTable.cc
+++ b/poppler/UnicodeTypeTable.cc
@@ -1167,8 +1167,11 @@ Unicode *unicodeNormalizeNFKC(Unicode *in, int len,
break;
u = out[r]; out[r] = out[r - 1]; out[r - 1] = u;
swap = classes[r]; classes[r] = classes[r - 1]; classes[r - 1] = swap;
- if (indices)
- swap = idx[r]; idx[r] = idx[r - 1]; idx[r - 1] = swap;
+ if (indices) {
+ swap = idx[r];
+ idx[r] = idx[r - 1];
+ idx[r - 1] = swap;
+ }
}
// canonical compose out[o, p)
for (q = o + 1; q < p; ++q)
commit 28da8bffb8a97ce082b2463647bfce2f24cfdcdc
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 5 19:52:00 2008 +0100
[Qt] Fix leak
diff --git a/qt/poppler-link.cc b/qt/poppler-link.cc
index deef9a4..1be7437 100644
--- a/qt/poppler-link.cc
+++ b/qt/poppler-link.cc
@@ -1,5 +1,5 @@
/* poppler-link.cc: qt interface to poppler
- * Copyright (C) 2006, Albert Astals Cid
+ * Copyright (C) 2006, 2008 Albert Astals Cid
* Adapting code from
* Copyright (C) 2004 by Enrico Ros <eros.kde at email.it>
*
@@ -29,10 +29,14 @@ namespace Poppler {
LinkDestination::LinkDestination(const LinkDestinationData &data)
{
+ bool deleteDest = false;
LinkDest *ld = data.ld;
if ( data.namedDest && !ld )
+ {
+ deleteDest = true;
ld = data.doc->doc.findDest( data.namedDest );
+ }
if (!ld) return;
@@ -72,6 +76,8 @@ namespace Poppler {
m_top = topAux;
m_right = rightAux;
m_bottom = bottomAux;
+
+ if (deleteDest) delete ld;
}
LinkDestination::LinkDestination(const QString &description)
commit 76b09c072954fbb6bbc1f491063e8dc1b386332f
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 5 19:49:18 2008 +0100
[Qt] Fix memory leak
diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
index 8b92397..50600ad 100644
--- a/qt/poppler-document.cc
+++ b/qt/poppler-document.cc
@@ -39,7 +39,9 @@ static GooString *QStringToGooString(const QString &s) {
char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i)
cstring[i] = s.at(i).unicode();
- return new GooString(cstring, len);
+ GooString *ret = new GooString(cstring, len);
+ gfree(cstring);
+ return ret;
}
Document *Document::load(const QString &filePath)
commit f909d71741c9a8cc3d88aba18182619594d84a7b
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 5 19:44:40 2008 +0100
Do not leak uBuf in the error case
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index e7842e5..0cbb4d7 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -126,6 +126,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(
int line, n, i;
if (!(f = fopen(fileName->getCString(), "r"))) {
+ gfree(uBuf);
error(-1, "Couldn't open unicodeToUnicode file '%s'",
fileName->getCString());
return NULL;
More information about the poppler
mailing list