1
1

fix memory leak in userauth_keyboard_interactive()

First I wanted to free the memory in session_free() but then
I had still memory leaks because in my test case the function
userauth_keyboard_interactive() is called twice. It is called
twice perhaps because the server has this authentication
methods available: publickey,gssapi-with-mic,keyboard-interactive
The keyboard-interactive method is successful.
Этот коммит содержится в:
Alfred Gebert 2010-10-25 14:28:08 +02:00 коммит произвёл Daniel Stenberg
родитель a7aee34522
Коммит b84f69c960

Просмотреть файл

@ -1612,6 +1612,10 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session,
session->userauth_kybd_prompts = NULL;
LIBSSH2_FREE(session, session->userauth_kybd_responses);
session->userauth_kybd_responses = NULL;
LIBSSH2_FREE(session, session->userauth_kybd_auth_name);
session->userauth_kybd_auth_name = NULL;
LIBSSH2_FREE(session, session->userauth_kybd_auth_instruction);
session->userauth_kybd_auth_instruction = NULL;
if (session->userauth_kybd_auth_failure) {
session->userauth_kybd_state = libssh2_NB_state_idle;