summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-02-27 13:27:03 +0000
committerRoland McGrath <roland@gnu.org>1999-02-27 13:27:03 +0000
commitc3aba1be9041b0e490e0fa60204680ec98eb93c2 (patch)
treed8ca48de1573e90773abff390e31514a76080d50 /hurd
parent2ee511d907bfab2ad22a42e1afab8b37cd7bf28b (diff)
downloadglibc-c3aba1be9041b0e490e0fa60204680ec98eb93c2.tar.gz
1999-02-27 Roland McGrath <roland@baalperazim.frob.com>
* hurd/hurdselect.c (_hurd_select): When bailing for bogus fd, don't try to _hurd_port_free a lower-numbered descriptor that was not in any fd_set.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdselect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index e65def5912..4e9bc39ac2 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -1,5 +1,5 @@
/* Guts of both `select' and `poll' for Hurd.
- Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,95,96,97,98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -172,8 +172,9 @@ _hurd_select (int nfds,
{
/* If one descriptor is bogus, we fail completely. */
while (i-- > 0)
- _hurd_port_free (&d[i].cell->port, &d[i].ulink,
- d[i].io_port);
+ if (d[i].type != 0)
+ _hurd_port_free (&d[i].cell->port, &d[i].ulink,
+ d[i].io_port);
break;
}
lastfd = i;