mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
gssapi: Check return value from ssh_gssapi_init()
Checking the session->gssapi is resulting in the very same results, but this approach is more direct and makes static analysis tools more happy. Thanks coverity! CID 1644000 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -616,12 +616,14 @@ ssh_gssapi_creds ssh_gssapi_get_creds(ssh_session session)
|
|||||||
*/
|
*/
|
||||||
void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds)
|
void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (session == NULL) {
|
if (session == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (session->gssapi == NULL) {
|
if (session->gssapi == NULL) {
|
||||||
ssh_gssapi_init(session);
|
rc = ssh_gssapi_init(session);
|
||||||
if (session->gssapi == NULL) {
|
if (rc == SSH_ERROR) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user