[vlc-devel] commit: libvlc: Make sure we unlock on error code path. (Pierre d' Herbemont )
git version control
git at videolan.org
Tue Jun 9 07:35:51 CEST 2009
vlc | branch: 1.0-bugfix | Pierre d'Herbemont <pdherbemont at free.fr> | Mon Jun 1 19:39:08 2009 -0700| [c9a2b2dfd9260e8968af185308ae40fb35193994] | committer: Pierre d'Herbemont
libvlc: Make sure we unlock on error code path.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c9a2b2dfd9260e8968af185308ae40fb35193994
---
src/control/event.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/control/event.c b/src/control/event.c
index d7f0b41..ae35e30 100644
--- a/src/control/event.c
+++ b/src/control/event.c
@@ -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;
}
More information about the vlc-devel
mailing list