[Libreoffice-commits] core.git: sdext/source
Norbert Thiebaud
nthiebaud at gmail.com
Mon Feb 18 07:50:18 PST 2013
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit fc1966171280113362b0659f63c0ed1e6cc41821
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Feb 17 16:33:14 2013 -0600
coverity#983173 Resource leak
Change-Id: I913ce32579ef9045fd3d33b48a653bc4ffc628da
Reviewed-on: https://gerrit.libreoffice.org/2206
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-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 d72ab83..15182c2 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
More information about the Libreoffice-commits
mailing list