diff --git a/ssh.c b/ssh.c index 6c1aeb75..89fa7854 100644 --- a/ssh.c +++ b/ssh.c @@ -5198,6 +5198,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt) ssh2_pkt_send(ssh); s->type = AUTH_TYPE_PUBLICKEY; + key->alg->freekey(key->data); } } else if (s->method == AUTH_PASSWORD) { /* diff --git a/sshbn.c b/sshbn.c index d0608a3a..8d4d703c 100644 --- a/sshbn.c +++ b/sshbn.c @@ -909,6 +909,7 @@ Bignum modinv(Bignum number, Bignum modulus) x = bigmuladd(q, xp, t); sign = -sign; freebn(t); + freebn(q); } freebn(b);