]> git.sesse.net Git - vlc/commitdiff
Fix mutex cancellation.
authorAntoine Cellerier <antoine@macbook.(none)>
Sun, 20 Dec 2009 14:06:22 +0000 (15:06 +0100)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 21 Dec 2009 20:45:17 +0000 (21:45 +0100)
modules/misc/lua/libs/misc.c

index e5a1f02aa175fc1681ca86b9e56fe784c4348ae1..e92da8cb32af9b3c7e1099cd7763d09044361113 100644 (file)
@@ -181,9 +181,10 @@ static int vlclua_lock_and_wait( lua_State *L )
     intf_sys_t *p_sys = p_intf->p_sys;
 
     vlc_mutex_lock( &p_sys->lock );
+    mutex_cleanup_push( &p_sys->lock );
     while( !p_sys->exiting )
         vlc_cond_wait( &p_sys->wait, &p_sys->lock );
-    vlc_mutex_unlock( &p_sys->lock );
+    vlc_cleanup_pop();
     lua_pushboolean( L, 1 );
     return 1;
 }