summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-05-09 10:50:27 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-05-09 10:50:27 +0200
commitd7a102f49e2ea63c1cf3ed79134ce6fc2b2c6a59 (patch)
tree0564b75762a177f285ff214f6beac41f06921867
parent9773c1534668d84b8267c3e5c9d612076fa231a5 (diff)
FoFiType1::parse - Fix memory leak on broken files
-rw-r--r--fofi/FoFiType1.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc
index 151f2d5f..44f16972 100644
--- a/fofi/FoFiType1.cc
+++ b/fofi/FoFiType1.cc
@@ -276,6 +276,7 @@ void FoFiType1::parse() {
if (code >= 0 && code < 256) {
c = *p2;
*p2 = '\0';
+ gfree(encoding[code]);
encoding[code] = copyString(p);
*p2 = c;
}