Commit 25c10c93 authored by Rémi Duraffort's avatar Rémi Duraffort

stream_out_rtp: fix potential memleak (#2447)

parent 2588f5f5
...@@ -357,6 +357,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -357,6 +357,8 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_port_audio && p_sys->i_port_video == p_sys->i_port_audio ) if( p_sys->i_port_audio && p_sys->i_port_video == p_sys->i_port_audio )
{ {
msg_Err( p_stream, "audio and video RTP port must be distinct" ); msg_Err( p_stream, "audio and video RTP port must be distinct" );
free( p_sys->psz_destination );
free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -469,6 +471,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -469,6 +471,7 @@ static int Open( vlc_object_t *p_this )
free( psz ); free( psz );
vlc_mutex_destroy( &p_sys->lock_sdp ); vlc_mutex_destroy( &p_sys->lock_sdp );
vlc_mutex_destroy( &p_sys->lock_es ); vlc_mutex_destroy( &p_sys->lock_es );
free( p_sys->psz_destination );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -483,6 +486,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -483,6 +486,7 @@ static int Open( vlc_object_t *p_this )
sout_AccessOutDelete( p_sys->p_grab ); sout_AccessOutDelete( p_sys->p_grab );
vlc_mutex_destroy( &p_sys->lock_sdp ); vlc_mutex_destroy( &p_sys->lock_sdp );
vlc_mutex_destroy( &p_sys->lock_es ); vlc_mutex_destroy( &p_sys->lock_es );
free( p_sys->psz_destination );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -494,6 +498,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -494,6 +498,7 @@ static int Open( vlc_object_t *p_this )
sout_AccessOutDelete( p_sys->p_grab ); sout_AccessOutDelete( p_sys->p_grab );
vlc_mutex_destroy( &p_sys->lock_sdp ); vlc_mutex_destroy( &p_sys->lock_sdp );
vlc_mutex_destroy( &p_sys->lock_es ); vlc_mutex_destroy( &p_sys->lock_es );
free( p_sys->psz_destination );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
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