mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-01 19:20:13 -05:00
Merge kex-hybrid memory leak fix from 'pre-0.83'
This commit is contained in:
commit
476ecf427a
@ -146,6 +146,7 @@ static bool hybrid_client_getkey(ecdh_key *ek, ptrlen remoteKey, BinarySink *bs)
|
||||
if (!ecdh_key_getkey(s->classical, classical_data,
|
||||
BinarySink_UPCAST(classical_key))) {
|
||||
ssh_hash_free(h);
|
||||
strbuf_free(classical_key);
|
||||
return false; /* classical DH key didn't validate */
|
||||
}
|
||||
s->alg->reformat(ptrlen_from_strbuf(classical_key), BinarySink_UPCAST(h));
|
||||
@ -238,6 +239,7 @@ static bool hybrid_server_getkey(ecdh_key *ek, ptrlen remoteKey, BinarySink *bs)
|
||||
if (!ecdh_key_getkey(s->classical, classical_data,
|
||||
BinarySink_UPCAST(classical_key))) {
|
||||
ssh_hash_free(h);
|
||||
strbuf_free(classical_key);
|
||||
return false; /* classical DH key didn't validate */
|
||||
}
|
||||
s->alg->reformat(ptrlen_from_strbuf(classical_key), BinarySink_UPCAST(h));
|
||||
|
Loading…
x
Reference in New Issue
Block a user