Commit 02c79d62 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential NULL dereference (CID 27).

And fix a potential memleak.
parent 5219f5ec
...@@ -1557,13 +1557,21 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1557,13 +1557,21 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
{ {
psz_filter = realloc( psz_filter, strlen( psz_filter ) + psz_filter = realloc( psz_filter, strlen( psz_filter ) +
sizeof(":deinterlace") ); sizeof(":deinterlace") );
if( psz_filter && *psz_filter ) strcat( psz_filter, ":" ); if( psz_filter )
{
if( *psz_filter )
strcat( psz_filter, ":" );
strcat( psz_filter, "deinterlace" ); strcat( psz_filter, "deinterlace" );
} }
}
p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT, p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT,
FIND_PARENT ); FIND_PARENT );
if( !p_input ) return VLC_EGENERIC; if( !p_input )
{
free( psz_filter );
return VLC_EGENERIC;
}
if( psz_mode && *psz_mode ) if( psz_mode && *psz_mode )
{ {
......
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