diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-17 16:33:14 -0600 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-18 15:49:59 +0000 |
commit | fc1966171280113362b0659f63c0ed1e6cc41821 (patch) | |
tree | 2ba68cc1c67307013c9fa7bf9807497456bfec34 /sdext | |
parent | 1c0dbe46298c71c3bec26f324927ce2562c611b6 (diff) |
coverity#983173 Resource leak
Change-Id: I913ce32579ef9045fd3d33b48a653bc4ffc628da
Reviewed-on: https://gerrit.libreoffice.org/2206
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index d72ab83c3d9c..15182c267869 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -451,10 +451,13 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const fflush(stdout); if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != (size_t)nSize ) + { + gfree(pBuf); exit(1); // error - + } // ---sync point--- see SYNC STREAMS above fflush(g_binary_out); + gfree(pBuf); } void PDFOutDev::printPath( GfxPath* pPath ) const |