[vlc-commits] freetype: fix leak on ruby layout failure

Francois Cartegnie git at videolan.org
Mon Aug 17 23:43:09 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 17 18:21:06 2020 +0200| [92c6441377a5fc4af783ff09286c349589a58f4d] | committer: Francois Cartegnie

freetype: fix leak on ruby layout failure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92c6441377a5fc4af783ff09286c349589a58f4d
---

 modules/text_renderer/freetype/text_layout.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index c19d46ddc2..3cdbffd5f3 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1670,6 +1670,8 @@ static int LayoutRubyText( filter_t *p_filter,
                     0, i_uchars - 1,
                     false, pp_line ) )
     {
+        for( int i = 0; i < p_paragraph->i_size; ++i )
+            ReleaseGlyphBitMaps( p_filter, &p_paragraph->p_glyph_bitmaps[ i ] );
         free( pp_styles );
         FreeParagraph( p_paragraph );
         return VLC_EGENERIC;



More information about the vlc-commits mailing list