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

Fix infinite loop

parent 6d9fde80
......@@ -339,9 +339,10 @@ static void vlc_object_destroy( vlc_object_t *p_this )
#ifndef NDEBUG
assert( p_global == vlc_global() );
/* Test for leaks */
for( vlc_object_t *leaked = p_priv->next;
leaked != p_this;
leaked = vlc_internals (leaked)->next )
if (p_priv->next != p_this)
{
vlc_object_t *leaked = p_priv->next, *first = leaked;
do
{
/* We are leaking this object */
fprintf( stderr,
......@@ -351,11 +352,11 @@ static void vlc_object_destroy( vlc_object_t *p_this )
/* 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 libvlc object to ease debugging */
/* Dump global object to ease debugging */
vlc_object_dump( p_this );
/* Strongly abort, cause we want these to be fixed */
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