summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-02-08 13:53:29 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-02-08 13:53:29 +0000
commit0e31aec87e545a4e3f3d51781361eab6b72da8ad (patch)
tree3d1627b892c0d47f7ed56f61d4361e9c6fbb2266 /sys/compat
parenta25f400aa62632e991663528e26a5426c250d001 (diff)
- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have
the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)).
Diffstat (limited to 'sys/compat')
-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 3c04d31004d..a3aa1de3bbd 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.12 2001/10/26 12:03:27 art Exp $ */
+/* $OpenBSD: svr4_net.c,v 1.13 2002/02/08 13:53:27 art Exp $ */
/* $NetBSD: svr4_net.c,v 1.12 1996/09/07 12:40:51 mycroft Exp $ */
/*
@@ -173,7 +173,7 @@ svr4_netopen(dev, flag, mode, p)
if ((error = socreate(family, &so, type, protocol)) != 0) {
DPRINTF(("socreate error %d\n", error));
fdremove(p->p_fd, fd);
- ffree(fp);
+ closef(fp);
return error;
}