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:
parent
9a59ef2313
commit
dc07435002
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue