[vlc-devel] commit: Assert that we don't leak input items ( Rafaël Carré )

git version control git at videolan.org
Mon Mar 31 22:26:36 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Mar 31 22:26:56 2008 +0200| [fdf1b8af4e8cd13f7c33a5994a7301b9ab7e9d4c]

Assert that we don't leak input items

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

 src/libvlc-common.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 2b981f5..7a29a70 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -993,11 +993,12 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
         announce_HandlerDestroy( p_announce );
     }
 
-    msg_Dbg( p_libvlc, "removing remaining input items" );
+    vlc_bool_t b_clean = VLC_TRUE;
     FOREACH_ARRAY( input_item_t *p_del, p_libvlc->input_items )
-        msg_Dbg( p_libvlc, "WARNING: %p input item has not been deleted properly", p_del );
-        /* Don't do anything, faulting code should be fixed */
+        msg_Err( p_libvlc, "input item %p has not been deleted properly: refcount %d", p_del, p_del->i_gc_refcount );
+        b_clean = VLC_FALSE;
     FOREACH_END();
+    assert( b_clean );
     ARRAY_RESET( p_libvlc->input_items );
 
     msg_Dbg( p_libvlc, "removing stats" );




More information about the vlc-devel mailing list