# HG changeset patch # User Matt Johnston # Date 1520524293 -28800 # Node ID 0bdbb9ecc403a0a32e9a96e54d566ede1f8718bd # Parent 98d2b125eb899689a68658347f99bb983962f12f avoid leak of ecdh public key diff -r 98d2b125eb89 -r 0bdbb9ecc403 common-kex.c --- a/common-kex.c Thu Mar 08 23:23:19 2018 +0800 +++ b/common-kex.c Thu Mar 08 23:51:33 2018 +0800 @@ -694,6 +694,9 @@ /* 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(); }