1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix closefrom(2) infinite loop.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-01-18 14:36:25 +01:00
parent 9a59ef2313
commit dc07435002

View file

@ -1,6 +1,6 @@
/******************************************************************************* /*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014, 2015. Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014, 2015, 2016.
This file is part of Sortix. This file is part of Sortix.
@ -301,7 +301,7 @@ int DescriptorTable::CloseFrom(int index)
return errno = EBADF, -1; return errno = EBADF, -1;
ScopedLock lock(&dtablelock); ScopedLock lock(&dtablelock);
bool any = false; bool any = false;
while ( index < numentries ) for ( ; index < numentries; index++ )
{ {
if ( !IsGoodEntry(index) ) if ( !IsGoodEntry(index) )
continue; continue;