[Libreoffice-commits] core.git: sdext/source

Norbert Thiebaud nthiebaud at gmail.com
Mon Feb 18 07:45:47 PST 2013


 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 64fd8989442b4a2bb9e7eb0a6feba43381d38eb9
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Feb 17 16:38:48 2013 -0600

    coverity#983175 Resource leak
    
    Change-Id: I03eadb6f1e7235f03149a386c407066f81473772
    Reviewed-on: https://gerrit.libreoffice.org/2207
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 102e564..d72ab83 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -427,7 +427,10 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
         // we must write byte count to stdout before
         char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
         if( pBuf )
+        {
             aNewFont.isEmbedded = true;
+            gfree(pBuf);
+        }
     }
 
     m_aFontMap[ nNewId ] = aNewFont;


More information about the Libreoffice-commits mailing list