The test after the memory allocation was backwards, so keyboard-interactive

would always fail due to a memory problem.
This commit is contained in:
James Housley 2007-07-18 19:54:51 +00:00
parent 3fc4caf42f
commit 05c1164a67

View File

@ -957,7 +957,7 @@ libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION *session, const char *u
;
session->userauth_kybd_data = s = LIBSSH2_ALLOC(session, session->userauth_kybd_packet_len);
if (s) {
if (!s) {
libssh2_error(session, LIBSSH2_ERROR_ALLOC, "Unable to allocate memory for keyboard-interactive authentication", 0);
return -1;
}