From: kramm Date: Wed, 12 Mar 2008 19:11:20 +0000 (+0000) Subject: fixed a mem leak X-Git-Tag: buttons-working~411 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;ds=inline;h=6179361ff3d4f22a2cbb83895768392556093362;hp=4e4ca53503fe65d797c088859b3bdcd60d48cf8f;p=swftools.git fixed a mem leak --- diff --git a/lib/gfxfont.c b/lib/gfxfont.c index 85af571..263757f 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -508,6 +508,10 @@ void gfxfont_free(gfxfont_t*font) if(font->unicode2glyph) { free(font->unicode2glyph);font->unicode2glyph = 0; } + if(font->id) { + free((void*)font->id);font->id=0; + } + free(font); } diff --git a/lib/pdf/InfoOutputDev.cc b/lib/pdf/InfoOutputDev.cc index fd33452..7a42e73 100644 --- a/lib/pdf/InfoOutputDev.cc +++ b/lib/pdf/InfoOutputDev.cc @@ -31,8 +31,8 @@ InfoOutputDev::~InfoOutputDev() } id2font->killIter(&i); - delete id2font; - delete splash; + delete id2font;id2font=0; + delete splash;splash=0; } void FontInfo::grow(int size) { @@ -65,6 +65,7 @@ FontInfo::~FontInfo() glyphs[t]=0; } } + free(glyphs);glyphs=0; } GBool InfoOutputDev::upsideDown() {return gTrue;} GBool InfoOutputDev::useDrawChar() {return gTrue;}