[vlc-commits] ttml: Fix leak on error
Hugo Beauzée-Luyssen
git at videolan.org
Thu Sep 15 13:16:21 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Sep 15 12:33:02 2016 +0200| [edcb46430a7368495b92968b98f915c6ca672bc2] | committer: Hugo Beauzée-Luyssen
ttml: Fix leak on error
Missing bits from 3502f812
fix cid #1372944
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edcb46430a7368495b92968b98f915c6ca672bc2
---
modules/demux/ttml.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index c6d68ee..ce979fd 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -625,10 +625,7 @@ static int ReadTTML( demux_t* p_demux )
subtitle_t* p_subtitles = realloc( p_sys->subtitle,
sizeof( *p_sys->subtitle ) * i_max_sub );
if( unlikely( p_subtitles == NULL ) )
- {
- ClearNode( p_node );
goto error;
- }
p_sys->subtitle = p_subtitles;
}
subtitle_t *p_subtitle = &p_sys->subtitle[p_sys->i_subtitles];
@@ -729,6 +726,7 @@ static int ReadTTML( demux_t* p_demux )
error:
free( psz_text );
+ ClearNode( p_node );
ClearNodeStack( p_parent_node );
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list