summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-08 23:51:33 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-08 23:51:33 +0800
commit38c9408cf859525029f6eb4fe00b50259e08e3f2 (patch)
treec87cfd9be94268bfbd39eb0543c323b118c96755
parent397af3e6a6ff4041894e2861b5fb0fae5c187997 (diff)
avoid leak of ecdh public key
-rw-r--r--common-kex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common-kex.c b/common-kex.c
index 7da3fb7..d4933dd 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -694,6 +694,9 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them,
/* K, the shared secret */
buf_putmpint(ses.kexhashbuf, ses.dh_K);
+ ecc_free(Q_them);
+ m_free(Q_them);
+
/* calculate the hash H to sign */
finish_kexhashbuf();
}