summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Freitag <Thomas.Freitag@alfa.de>2013-08-08 20:33:54 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-08-17 01:12:48 +0200
commit9f4d7796589e4c9c1645fbbcf0cfabd79a71bde9 (patch)
tree35928badc79c1d5aa1e4eec7d24f1740e04cfd5a
parent73cca518c479594e26605196d54b429fbf42dcdc (diff)
use copyString where memory is freed with gfree
Bug #67666
-rw-r--r--poppler/Annot.cc2
-rw-r--r--poppler/Dict.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index f0cce6d0..00291f8c 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -4990,7 +4990,7 @@ void AnnotWidget::generateFieldAppearance() {
}
// build the appearance stream
- appearStream = new MemStream(strdup(appearBuf->getCString()), 0,
+ appearStream = new MemStream(copyString(appearBuf->getCString()), 0,
appearBuf->getLength(), &appearDict);
appearance.free();
appearance.initStream(appearStream);
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index 3f3c022b..4cf42dcd 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -96,7 +96,7 @@ Dict::Dict(Dict* dictA) {
sorted = dictA->sorted;
entries = (DictEntry *)gmallocn(size, sizeof(DictEntry));
for (int i=0; i<length; i++) {
- entries[i].key = strdup(dictA->entries[i].key);
+ entries[i].key = copyString(dictA->entries[i].key);
dictA->entries[i].val.copy(&entries[i].val);
}
}