Commit fc4b7b3c authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential segfault introduced by myself (CID 263)

parent ae578e67
......@@ -1853,12 +1853,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 )
......@@ -1879,7 +1877,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;
}
......@@ -1897,12 +1894,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