Commit 43cde503 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix massive leak when --vout-filter or --vout module_Need fails

parent 1168cbcf
...@@ -487,6 +487,9 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) ...@@ -487,6 +487,9 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
if( p_vout->p_module == NULL ) if( p_vout->p_module == NULL )
{ {
msg_Err( p_vout, "no suitable vout module" ); msg_Err( p_vout, "no suitable vout module" );
spu_Attach( p_vout->p_spu, p_vout, false );
spu_Destroy( p_vout->p_spu );
p_vout->p_spu = NULL;
vlc_object_release( p_vout ); vlc_object_release( p_vout );
return NULL; return NULL;
} }
...@@ -583,7 +586,8 @@ static void vout_Destructor( vlc_object_t * p_this ) ...@@ -583,7 +586,8 @@ static void vout_Destructor( vlc_object_t * p_this )
assert( !p_vout->p_module ); assert( !p_vout->p_module );
/* */ /* */
spu_Destroy( p_vout->p_spu ); if( p_vout->p_spu )
spu_Destroy( p_vout->p_spu );
/* Destroy the locks */ /* Destroy the locks */
vlc_cond_destroy( &p_vout->p->change_wait ); vlc_cond_destroy( &p_vout->p->change_wait );
......
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