Commit 3933d03e0a501f9311c7a35f7df8bfbf17c0c3f2

Richard 2018-02-15T20:47:42

Merge pull request #11 from OlivierSohn/master Fix a memory leak

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/FTGlyph/FTPixmapGlyph.cpp b/src/FTGlyph/FTPixmapGlyph.cpp
index 2d0e406..fee383c 100644
--- a/src/FTGlyph/FTPixmapGlyph.cpp
+++ b/src/FTGlyph/FTPixmapGlyph.cpp
@@ -54,6 +54,7 @@ FTGlyphImpl *FTPixmapGlyph::NewImpl(FT_GlyphSlot glyph)
   FTPixmapGlyphImpl *Impl = new FTPixmapGlyphImpl(glyph);
   if (Impl->destWidth && Impl->destHeight)
     return Impl;
+  delete Impl;
   return new FTBitmapGlyphImpl(glyph);
 }