select.c: Make the ugly hacker uglier...

Right now I'm seeing crashes when removing a link and deleting
it and I need this hack to make it not crash. We will have to
understand if llist_for_each_entry_safe has a bug or if we are
doing something bad with the list (anchors not properly initialized).
This commit is contained in:
Holger Hans Peter Freyther 2010-04-11 17:33:19 +02:00
parent 163d0ea85b
commit 23ba4747d1
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ restart:
/* ugly, ugly hack. If more than one filedescriptors were
* unregistered, they might have been consecutive and
* llist_for_each_entry_safe() is no longer safe */
if (unregistered_count > 1)
/* this seems to happen with the last element of the list as well */
if (unregistered_count >= 1)
goto restart;
}
return work;