kbdint_free(kbdintctxt); authctxt->kbdintctxt = NULL;
auth2_challenge_stop(authctxt);
input_userauth_info_response(int type, int plen, void *ctxt){	Authctxt *authctxt = ctxt;	KbdintAuthctxt *kbdintctxt;	int i, authenticated = 0, res, len;	u_int nresp;	char **response = NULL, *method;	if (authctxt == NULL)		fatal("input_userauth_info_response: no authctxt");	kbdintctxt = authctxt->kbdintctxt;	if (kbdintctxt == NULL || kbdintctxt->ctxt == NULL)		fatal("input_userauth_info_response: no kbdintctxt");	if (kbdintctxt->device == NULL)		fatal("input_userauth_info_response: no device");	authctxt->postponed = 0;	/* reset */	nresp = packet_get_int();	if (nresp > 0) {		response = xmalloc(nresp * sizeof(char*));		for (i = 0; i < nresp; i++)			response[i] = packet_get_string(NULL);	}	packet_done();	if (authctxt->valid) {		res = kbdintctxt->device->respond(kbdintctxt->ctxt,		    nresp, response);	} else {		res = -1;	}	for (i = 0; i < nresp; i++) {		memset(response[i], 'r', strlen(response[i]));		xfree(response[i]);	}	if (response)		xfree(response);	switch (res) {	case 0:		/* Success! */		authenticated = 1;		break;	case 1:		/* Authentication needs further interaction */		authctxt->postponed = 1;		if (send_userauth_info_request(authctxt) == 0) {			authctxt->postponed = 0;		}		break;	default:		/* Failure! */		break;	}	len = strlen("keyboard-interactive") + 2 +		strlen(kbdintctxt->device->name);	method = xmalloc(len);	method[0] = '\0';	strlcat(method, "keyboard-interactive", len);	strlcat(method, "/", len);	strlcat(method, kbdintctxt->device->name, len);	if (!authctxt->postponed) {		/* unregister callback */		dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);		if (authenticated) {			kbdint_free(kbdintctxt);			authctxt->kbdintctxt = NULL;		} else {			/* start next device */			/* may set authctxt->postponed */			auth2_challenge_start(authctxt);		}	}	userauth_finish(authctxt, authenticated, method);	xfree(method);}