summaryrefslogtreecommitdiffstats
path: root/sys/crypto/cryptodev.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2002-02-08 13:53:27 +0000
committerart <art@openbsd.org>2002-02-08 13:53:27 +0000
commit43c6a78befebd24f220c7d68787d20a6f035d4fe (patch)
tree04d50079db715a2bbe95431b803233d4950c68c1 /sys/crypto/cryptodev.c
parentThere are NFS servers where it's possible to modify a symbolic link. Remove aggressive optimization (diff)
downloadwireguard-openbsd-43c6a78befebd24f220c7d68787d20a6f035d4fe.tar.xz
wireguard-openbsd-43c6a78befebd24f220c7d68787d20a6f035d4fe.zip
- 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/crypto/cryptodev.c')
-rw-r--r--sys/crypto/cryptodev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c
index e531a1ecaa9..3c2ac1f87a1 100644
--- a/sys/crypto/cryptodev.c
+++ b/sys/crypto/cryptodev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.c,v 1.28 2001/11/13 17:45:46 deraadt Exp $ */
+/* $OpenBSD: cryptodev.c,v 1.29 2002/02/08 13:53:28 art Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -541,7 +541,6 @@ cryptoioctl(dev, cmd, data, flag, p)
fcr->sesn = 0;
error = falloc(p, &f, &fd);
-
if (error) {
FREE(fcr, M_XDATA);
return (error);