mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
ECDH kex: remove pointless NULL check.
None of the constructors can fail and return NULL. I think this must have come in with a lot of other unnecessary null-pointer checks when ECC support was first added. I've got rid of most of them since then, but that one apparently escaped my notice.
This commit is contained in:
parent
c6d7ffda68
commit
b88057d09d
@ -193,11 +193,6 @@ void ssh2kex_coroutine(struct ssh2_transport_state *s, bool *aborted)
|
||||
s->ppl.bpp->pls->kctx = SSH2_PKTCTX_ECDHKEX;
|
||||
|
||||
s->ecdh_key = ecdh_key_new(s->kex_alg, false);
|
||||
if (!s->ecdh_key) {
|
||||
ssh_sw_abort(s->ppl.ssh, "Unable to generate key for ECDH");
|
||||
*aborted = true;
|
||||
return;
|
||||
}
|
||||
|
||||
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH2_MSG_KEX_ECDH_INIT);
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user