Do not leak the global libvlc pointer
authorRafaël Carré <funman@videolan.org>
Mon, 5 May 2008 09:31:16 +0000 (11:31 +0200)
committerRafaël Carré <funman@videolan.org>
Mon, 5 May 2008 09:31:16 +0000 (11:31 +0200)
src/misc/threads.c

index 5abe974..eb907ee 100644 (file)
@@ -183,7 +183,8 @@ void vlc_threads_end( void )
 #endif
 
     assert( i_initializations > 0 );
-    if( i_initializations == 0 )
+
+    if( i_initializations == 1 )
         vlc_object_release( p_root );
     i_initializations--;