diff options
author | Oliver Sander <oliver.sander@tu-dresden.de> | 2017-10-29 20:28:52 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2017-10-30 21:47:05 +0100 |
commit | 4d109589e5d2ac989d4fd7ac318ddf976f3106ed (patch) | |
tree | 470d0c60db0b7dda32bf2e880236bda1bbd1701e | |
parent | b9ae2fd75c147988653093d0ecbf66188d81f8fc (diff) |
Fix leak in ArthurOutputDev::updateFont
Bug #103508
-rw-r--r-- | qt5/src/ArthurOutputDev.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt5/src/ArthurOutputDev.cc b/qt5/src/ArthurOutputDev.cc index 3be12672..8d3c801e 100644 --- a/qt5/src/ArthurOutputDev.cc +++ b/qt5/src/ArthurOutputDev.cc @@ -341,6 +341,9 @@ void ArthurOutputDev::updateFont(GfxState *state) m_rawFont = new QRawFont(QByteArray(fontData, fontDataLen), fontSize); m_rawFontCache.insert(std::make_pair(fontID,std::unique_ptr<QRawFont>(m_rawFont))); + + // Free the font data, it was copied in the QByteArray constructor + free((char*)fontData); break; } case gfxFontLocExternal:{ // font is in an external font file |