Skip to content

Commit

Permalink
Free global GSS context directly if we didn't do GSS KEX.
Browse files Browse the repository at this point in the history
No reason to have it around then.
  • Loading branch information
adamel committed Jun 23, 2015
1 parent ec742ac commit a38cdf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -7283,6 +7283,11 @@ static void do_ssh2_transport(Ssh ssh, void *vin, int inlen,
}
if (!ssh->did_gssapi_kex) {
ssh->can_gssapi_kex = FALSE;
/* If we didn't do GSSKEX we have no need for global context. */
if (ssh->gss_ctx) {
ssh->gsslib->release_cred(ssh->gsslib, &ssh->gss_ctx);
ssh->gss_ctx = NULL;
}
}
#endif
ssh->hostkey->freekey(s->hkey);
Expand Down

0 comments on commit a38cdf6

Please sign in to comment.