mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-25 18:22:29 +03:00
auth: Make error handling code reachable again.
Found by Coverity.
This commit is contained in:
parent
3e93836e8b
commit
131a0de32e
10
src/auth.c
10
src/auth.c
@ -566,7 +566,7 @@ int ssh_userauth_try_publickey(ssh_session session,
|
|||||||
|
|
||||||
/* algo */
|
/* algo */
|
||||||
str = ssh_string_from_char(pubkey->type_c);
|
str = ssh_string_from_char(pubkey->type_c);
|
||||||
if (rc < 0) {
|
if (str == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ int ssh_userauth_publickey(ssh_session session,
|
|||||||
|
|
||||||
/* algo */
|
/* algo */
|
||||||
str = ssh_string_from_char(privkey->type_c);
|
str = ssh_string_from_char(privkey->type_c);
|
||||||
if (rc < 0) {
|
if (str == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -864,7 +864,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
|
|||||||
|
|
||||||
/* algo */
|
/* algo */
|
||||||
str = ssh_string_from_char(pubkey->type_c);
|
str = ssh_string_from_char(pubkey->type_c);
|
||||||
if (rc < 0) {
|
if (str == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1388,7 +1388,7 @@ int ssh_userauth_password(ssh_session session,
|
|||||||
|
|
||||||
/* password */
|
/* password */
|
||||||
str = ssh_string_from_char(password);
|
str = ssh_string_from_char(password);
|
||||||
if (rc < 0) {
|
if (str == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1614,7 +1614,7 @@ static int ssh_userauth_kbdint_init(ssh_session session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
str = ssh_string_from_char(submethods);
|
str = ssh_string_from_char(submethods);
|
||||||
if (rc < 0) {
|
if (str == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user