]> granicus.if.org Git - libass/commitdiff
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://svn.mplayerhq.hu/mplayer/trunk@23208 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index 7a118e02b1a5914012fe2433c1c97660e7a78c24..820dfd9cad232d798d5f7476703077c2583c40f2 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);
 }
 
 /**