Always deallocate glyphs. Fixes memory leak.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Wed, 2 May 2007 10:15:12 +0000 (10:15 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Wed, 2 May 2007 10:15:12 +0000 (10:15 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@23208 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index 7a118e0..820dfd9 100644 (file)
@@ -1307,12 +1307,12 @@ static void get_bitmap_glyph(glyph_info_t* info)
                        hash_val.bm_s = info->bm_s;
                        cache_add_bitmap(&(info->hash_key), &hash_val);
                }
-               // deallocate glyphs
-               if (info->glyph)
-                       FT_Done_Glyph(info->glyph);
-               if (info->outline_glyph)
-                       FT_Done_Glyph(info->outline_glyph);
        }
+       // deallocate glyphs
+       if (info->glyph)
+               FT_Done_Glyph(info->glyph);
+       if (info->outline_glyph)
+               FT_Done_Glyph(info->outline_glyph);
 }
 
 /**