summaryrefslogtreecommitdiff
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-07-13 15:17:54 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-07-13 15:17:54 +0000
commitd0e661be14492b0bc5cc1cd3252e0a4302c8a350 (patch)
treede457786be963b3322bbd360c2a883f7466231fe /sys/compat/svr4
parent7bb26b9d5348995f3970820e647e2058c0fa94c9 (diff)
introduce fdremove() to mark a file descriptor as unused. fdremove makes
sure that the fd_freefile hints stay in sync, otherwise free file descriptors might not be overlooked by fdalloc(); ok millert@
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_net.c b/sys/compat/svr4/svr4_net.c
index cbdc30b911d..4b9b85410b4 100644
--- a/sys/compat/svr4/svr4_net.c
+++ b/sys/compat/svr4/svr4_net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_net.c,v 1.8 1997/02/13 19:45:20 niklas Exp $ */
+/* $OpenBSD: svr4_net.c,v 1.9 1999/07/13 15:17:53 provos Exp $ */
/* $NetBSD: svr4_net.c,v 1.12 1996/09/07 12:40:51 mycroft Exp $ */
/*
@@ -171,7 +171,7 @@ svr4_netopen(dev, flag, mode, p)
if ((error = socreate(family, &so, type, protocol)) != 0) {
DPRINTF(("socreate error %d\n", error));
- p->p_fd->fd_ofiles[fd] = 0;
+ fdremove(p->p_fd, fd);
ffree(fp);
return error;
}