From 13f5a18f2b6b7c384d2801beecd6d5c29c164ef1 Mon Sep 17 00:00:00 2001 From: "Dr.Smile" Date: Sun, 2 Dec 2018 23:37:12 +0300 Subject: renderer: fix potential memory leak --- libass/ass_render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libass') 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) -- cgit v1.2.3