- markus@cvs.openbsd.org 2001/12/09 18:45:56
     [auth2.c auth2-chall.c auth.h]
     add auth2_challenge_stop(), simplifies cleanup of kbd-int sessions,
     fixes memleak.
diff --git a/auth2.c b/auth2.c
index 3cfba7a..29bbdf4 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.74 2001/12/05 03:56:39 itojun Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.75 2001/12/09 18:45:56 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -220,14 +220,8 @@
 		    authctxt->user, authctxt->service, user, service);
 	}
 	/* reset state */
-	dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &protocol_error);
+	auth2_challenge_stop(authctxt);
 	authctxt->postponed = 0;
-#ifdef BSD_AUTH
-	if (authctxt->as) {
-		auth_close(authctxt->as);
-		authctxt->as = NULL;
-	}
-#endif
 
 	/* try to authenticate user */
 	m = authmethod_lookup(method);