Commit 9b8589f8 authored by Pierre's avatar Pierre

libvlc: Make sure we unlock on error code path.

parent 5d59d04c
......@@ -170,6 +170,7 @@ void libvlc_event_send( libvlc_event_manager_t * p_em,
array_listeners_cached = malloc(sizeof(libvlc_event_listener_t)*(i_cached_listeners));
if( !array_listeners_cached )
{
vlc_mutex_unlock( &p_em->object_lock );
fprintf(stderr, "Can't alloc memory in libvlc_event_send" );
return;
}
......@@ -188,6 +189,7 @@ void libvlc_event_send( libvlc_event_manager_t * p_em,
if( !listeners_group )
{
free( array_listeners_cached );
vlc_mutex_unlock( &p_em->object_lock );
return;
}
......
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