summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-03-30 22:01:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-03-30 22:01:52 +0000
commit4ea13a077c423eacc4d1e291e35b986a9e61aedb (patch)
treef3134a865973622e5df5e388e47d431bfceae8d4
parentc41a3906b3b42cfa3cf0b212e0e63e5a924e91ba (diff)
correct an auth_close() misuse; millert ok
-rw-r--r--libexec/ftpd/ftpd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 0cfdd4b6cf5..4e3a465c948 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.124 2002/03/16 19:15:12 millert Exp $ */
+/* $OpenBSD: ftpd.c,v 1.125 2002/03/30 22:01:51 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -73,7 +73,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
#else
-static char rcsid[] = "$OpenBSD: ftpd.c,v 1.124 2002/03/16 19:15:12 millert Exp $";
+static char rcsid[] = "$OpenBSD: ftpd.c,v 1.125 2002/03/30 22:01:51 deraadt Exp $";
#endif
#endif /* not lint */
@@ -888,8 +888,10 @@ pass(passwd)
/* Sleep between 1 and 3 seconds to emulate a crypt. */
us = arc4random() % 3000000;
usleep(us);
- if (as != NULL)
+ if (as != NULL) {
auth_close(as);
+ as = NULL;
+ }
} else {
authok = auth_userresponse(as, passwd, 0);
as = NULL;