Commit bde096d8 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Derk-Jan Hartman

Fix potential segfault introduced by myself (CID 263)

(cherry picked from commit fc4b7b3c)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent 98ee17c2
......@@ -1849,12 +1849,10 @@ static int ParseRealText( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
int h1 = 0, m1 = 0, s1 = 0, f1 = 0;
int h2 = 0, m2 = 0, s2 = 0, f2 = 0;
const char *s = TextGetLine( txt );
free( psz_text );
if( !s )
{
free( psz_text );
return VLC_EGENERIC;
}
psz_text = malloc( strlen( s ) + 1 );
if( !psz_text )
......@@ -1875,7 +1873,6 @@ static int ParseRealText( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
psz_begin, psz_text ) != 2) )
/* Line is not recognized */
{
free( psz_text );
continue;
}
......@@ -1893,12 +1890,6 @@ static int ParseRealText( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
}
break;
}
/* Line is not recognized */
else
{
free( psz_text );
continue;
}
}
/* Get the following Lines */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment