Commit debed14a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix infinite loop

parent 6d9fde80
...@@ -339,23 +339,24 @@ static void vlc_object_destroy( vlc_object_t *p_this ) ...@@ -339,23 +339,24 @@ static void vlc_object_destroy( vlc_object_t *p_this )
#ifndef NDEBUG #ifndef NDEBUG
assert( p_global == vlc_global() ); assert( p_global == vlc_global() );
/* Test for leaks */ /* Test for leaks */
for( vlc_object_t *leaked = p_priv->next; if (p_priv->next != p_this)
leaked != p_this;
leaked = vlc_internals (leaked)->next )
{ {
/* We are leaking this object */ vlc_object_t *leaked = p_priv->next, *first = leaked;
fprintf( stderr, do
"ERROR: leaking object (id:%i, type:%s, name:%s)\n", {
leaked->i_object_id, leaked->psz_object_type, /* We are leaking this object */
leaked->psz_object_name ); fprintf( stderr,
/* Dump libvlc object to ease debugging */ "ERROR: leaking object (id:%i, type:%s, name:%s)\n",
vlc_object_dump( leaked ); leaked->i_object_id, leaked->psz_object_type,
fflush(stderr); leaked->psz_object_name );
} /* Dump libvlc object to ease debugging */
vlc_object_dump( leaked );
fflush(stderr);
leaked = vlc_internals (leaked)->next;
}
while (leaked != first);
if( p_priv->next != p_this ) /* Dump global object to ease debugging */
{
/* Dump libvlc object to ease debugging */
vlc_object_dump( p_this ); vlc_object_dump( p_this );
/* Strongly abort, cause we want these to be fixed */ /* Strongly abort, cause we want these to be fixed */
abort(); abort();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment