summaryrefslogtreecommitdiff
path: root/sys/crypto
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/crypto
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/crypto')
-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);