[vlc-devel] commit: Do not leak the global libvlc pointer ( Rafaël Carré )

git version control git at videolan.org
Mon May 5 11:30:30 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon May  5 11:31:16 2008 +0200| [29e6e23f4ac5cdec84f6e2b161c90f97129f6a76]

Do not leak the global libvlc pointer

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29e6e23f4ac5cdec84f6e2b161c90f97129f6a76
---

 src/misc/threads.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/misc/threads.c b/src/misc/threads.c
index 5abe974..eb907ee 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -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--;
 




More information about the vlc-devel mailing list