Commit 19933fe7 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential memleak.

parent ab1e2b52
...@@ -299,6 +299,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -299,6 +299,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_fd < 0 ) if( p_sys->i_fd < 0 )
{ {
msg_Err( p_aout, "cannot open audio device (%s)", psz_device ); msg_Err( p_aout, "cannot open audio device (%s)", psz_device );
free( psz_device );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -279,7 +279,10 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add ) ...@@ -279,7 +279,10 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
psz_parser = psz_string; psz_parser = psz_string;
if( asprintf( &psz_string, ( *psz_string ) ? "%s:%s" : "%s%s", if( asprintf( &psz_string, ( *psz_string ) ? "%s:%s" : "%s%s",
psz_string, psz_name ) == -1 ) psz_string, psz_name ) == -1 )
{
free( psz_parser );
return; return;
}
free( psz_parser ); free( psz_parser );
} }
else else
......
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