From: Dr.Smile Date: Sun, 2 Dec 2018 20:37:12 +0000 (+0300) Subject: renderer: fix potential memory leak X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13f5a18f2b6b7c384d2801beecd6d5c29c164ef1;p=libass renderer: fix potential memory leak --- diff --git a/libass/ass_render.c b/libass/ass_render.c index dbfa00b..8e5014e 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1187,8 +1187,10 @@ transform_3d(ASS_Vector shift, ASS_Outline *outline, int n_outlines, static void get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) { - if (!info->outline || info->symbol == '\n' || info->symbol == 0 || info->skip) + if (!info->outline || info->symbol == '\n' || info->symbol == 0 || info->skip) { + ass_cache_dec_ref(info->hash_key.u.outline.outline); return; + } BitmapHashValue *val = ass_cache_get(render_priv->cache.bitmap_cache, &info->hash_key, render_priv); if (!val || !val->valid)