diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-05-23 22:18:16 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-05-23 22:18:16 +0800 |
commit | d9e790e7dc7737158c9affb7087035dd2c31c003 (patch) | |
tree | 0e610eace4bd5b3f25812e30b85b0c22063c28ef /common-kex.c | |
parent | 51b5cdd4308f4236d4d1453d482d0086d11a851e (diff) |
Add m_mp_alloc_init_multi() helper
--HG--
branch : ecc
Diffstat (limited to 'common-kex.c')
-rw-r--r-- | common-kex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common-kex.c b/common-kex.c index 0cd3db3..a32ca6d 100644 --- a/common-kex.c +++ b/common-kex.c @@ -633,8 +633,7 @@ void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them, } /* K = e^y mod p = f^x mod p */ - ses.dh_K = (mp_int*)m_malloc(sizeof(mp_int)); - m_mp_init(ses.dh_K); + m_mp_alloc_init_multi(&ses.dh_K, NULL); if (mp_exptmod(dh_pub_them, ¶m->priv, &dh_p, ses.dh_K) != MP_OKAY) { dropbear_exit("Diffie-Hellman error"); } |